• Stars
    star
    426
  • Rank 99,558 (Top 2 %)
  • Language Vue
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Datepicker Component For Vue

Vue Datepicker Component

GitHub package.json version codecov npm GitHub

A Datepicker Component For VueJs (https://edisdev.github.io/vue-datepicker-ui)



Using

Installing

for Vue 2.x

   yarn add vue-datepicker-ui

for Vue 3.x

   yarn add vue-datepicker-ui@vue3

Import to Project

// main.js file
import VueDatepickerUi from 'vue-datepicker-ui'
import 'vue-datepicker-ui/lib/vuedatepickerui.css';

Vue.component('Datepicker', VueDatepickerUi)

or

<script>
  import 'vue-datepicker-ui/lib/vuedatepickerui.css';
  import VueDatepickerUi from 'vue-datepicker-ui';

  export default {
    components: {
      Datepicker: VueDatepickerUi
    }
  }
</script>

and

<template>
  <datepicker ...props>
</template>

Props

   <Datepicker 
    v-model="" 
    :range="" 
    :lang="" 
    :firstDayOfWeek="" 
    :input-class="" 
    :position="" 
    :disabled-start-date="" 
    :disabled-end-date=""
    :text-format="" 
    :date-format=""
    :disabled=""
    :placeholder=""
    :circle=""
    :show-clear-button=""
    :show-picker-inital=""/>
Prop Type Value Default
value/modelValue (v-model) Object Date or Array for range {}
range Boolean - false
lang String Supports all languages / iso code language tr
firstDayOfWeek String monday or sunday monday
inputClass String classname for input -
position String options = top, bottom, left, right left
disabled-start-date Object This object consists of the start and end information(from and to params). ( For single status and range status of startDate). { from: null, to: null}
disabled-end-date Object It has the same with disabled-start-end. (For range status of end Date. Ignored in single status.) { from: null, to: null}
text-format String Short And Long / Short and long formats of month and day names -
date-format Object This is the format in which the selected date will be displayed to the user. { day: '2-digit', month: 'long', year: 'numeric' }
disabled Boolean This parameter is the datepicker prevents opening false
placeholder String Input placeholder Select Date
circle Boolean This is selected are circle or area false
showClearButton Boolean This property is If there is a selected date, it allows the button used to delete this date to be displayed or not. false
showPickerInital Booelan Show picker for on mounted false

and customize style with css variables

element {
  --v-calendar-picker-color: #fff;
  --v-calendar-input-bg-color: #fff;
  --v-calendar-input-bg-disable-color:rgb(245, 245, 245);
  --v-calendar-input-text-disable-color:#b8b8b9;
  --v-calendar-select-bg-color: #fff;
  --v-calendar-border-color: #eaeaeb;
  --v-calendar-triangle-color: #eaeaeb;
  --v-calendar-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.2);
  --v-calendar-top-shadow: 3px -14px 30px 0px rgba(0, 0, 0, 0.2);
  --v-calendar-text-color: #7b8187;
  --v-calendar-action-color: #7b8187;
  --v-calendar-text-disabled-color: #b8b8b9;
  --v-calendar-view-button-color: #7b8187;
  --v-calendar-view-button-font-weight: 400;
  --v-calendar-view-button-font-size: 1rem;
  --v-calendar-datepicker-icon-color: #1bba67;
  --v-calendar-datepicker-icon-size: 1.1rem;
  --v-calendar-active-bg-color: #1bba67;
  --v-calendar-active-text-color: #fff;
  --v-calendar-range-bg-color: #edfff9;
  --v-calendar-range-text-color: #7b8187;
  --v-calendar-range-radius: 100%;
  --v-calendar-day-hover-bg-color: #eaeaeb;
  --v-calendar-day-width: 40px;
  --v-calendar-day-height: 40px;
  --v-calendar-day-font-size: 0.9rem;
  --v-calendar-day-font-weight: 400;
  --v-calendar-day-name-font-size: 0.9rem;
  --v-calendar-day-name-font-weight: 500;
  --v-calendar-day-name-color: #7b8187;
  --v-calendar-input-border: 1px solid #eaeaeb;
  --v-calendar-input-text-color: #7b8187;
  --v-calendar-input-font-size: 0.9rem;
  --v-calendar-input-font-weight: 400;
  --v-calendar-content-radius: 0px;
  --v-calendar-year-font-size: 1.1rem;
  --v-calendar-year-color: #7b8187;
  --v-calendar-year-font-weight: 400;
  --v-calendar-year-disabled-color: #b8b8b9;
  --v-calendar-year-disabled-bg-color: transparent;
  --v-calendar-year-padding: 10px;
  --v-calendar-year-border: none;
  --v-calendar-year-border-radius: none;
  --v-calendar-month-font-size: 1.1rem;
  --v-calendar-month-color: #7b8187;
  --v-calendar-month-font-weight: 400;
  --v-calendar-month-disabled-color: #b8b8b9;
  --v-calendar-month-disabled-bg-color: transparent;
  --v-calendar-month-padding: 8px;
  --v-calendar-month-border: none;
  --v-calendar-month-border-radius: none;
}

DEMO (https://edisdev.github.io/vue-datepicker-ui)

note:

date-format object values is consists to toLocaleString in js. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).

Development:

Firstly

  yarn add --peer vue

Because, Vue is peer dependency. Then,

  yarn install
  yarn docs:dev

More Repositories

1

periodic-table

PERIODIC TABLE WITH VUE JS
Vue
228
star
2

vue-i18n-service

vue-i18n single file component exporter/importer
JavaScript
144
star
3

vue-google-maps-ui

Google Map Component For Vue 3
Vue
37
star
4

vue3-boilerplate

Vue 3 Boilerplate 🔥
JavaScript
28
star
5

download-json-data

Download json data, csv, excel or json file with Vue Component
JavaScript
24
star
6

vue-i18n-translator

Vue
23
star
7

algorithm-lessons

Programlamanın Temeli Algoritma Dersleri
16
star
8

object-detection-example

Object Detection with P5 & ML5 js
JavaScript
15
star
9

bir-islem-bir-sonuc

React ile küçük bir oyun denemesi
JavaScript
14
star
10

google-maps-loader-helper

Helper for Google Maps Js API Loader Package
JavaScript
12
star
11

calendar.js

Generate calendar data with javascript 📅
JavaScript
12
star
12

vue-generate-module

Vue Module Generator ( For Pages ( With Store ) Or Component Folder )
Shell
11
star
13

anilarda-yasiyoruz

Aramızdan yitip giden ama bıraktığı anılarla, değerlerle gönüllerde yaşayanlara saygılarımla
JavaScript
10
star
14

next-boilerplate

Next Basic Boilerplate
JavaScript
8
star
15

matematiksel-programlama

Bu repoda bazı matematiksel problemleri çözüyoruz
JavaScript
5
star
16

math-formulas-and-proofs

Math Formlas and Proofs
JavaScript
5
star
17

ezan-vakitleri

Bir React Native Denemesidir 🧐
JavaScript
5
star
18

vue2-vs-vue3

Vue 2 Options API ile Vue 3 Composition API arasında karşılaştırma.
Vue
4
star
19

vue-native-test

Vue
4
star
20

RSA-ENCRYPTION-WITH-LARAVEL-

This is a mathematicians RSA Algorithm :)
PHP
4
star
21

matematik-hayatta

Bazı matematik konularını anlatıp / algoritmik örnekler yapıyoruz
4
star
22

mesleki-istatistikler

Hangi meslek grubu ne kadar çalışıyor, ne kazanıyor vb. bilgileri istatistiklerini barından bir proje
JavaScript
3
star
23

aws-community-day-turkey-demo

AWS Community Day 2021 Presentation Demo
JavaScript
3
star
24

edisdev

2
star
25

vue-switch-button

Switch Button with vue.js
JavaScript
2
star
26

react-challenge-app

React Challenge
JavaScript
2
star
27

edisdev.github.io

HTML
1
star
28

BigCalculator

Big Calculator
Java
1
star
29

dexie-demo

Dexie Demo With Vue
Vue
1
star
30

pinia-demo

Pinia Demo
Vue
1
star
31

VSCODEUSEFULPLUGIN

VSCODE İçin Faydalı Eklentiler
1
star
32

tasarim-mutfagi-web

❗️UNDER CONSTRUCTION
CSS
1
star