1.2.0 • Published 3 years ago

vue-vanilla-datetime-picker v1.2.0

Weekly downloads
317
License
MIT
Repository
github
Last release
3 years ago

Vue Datetime Picker

Build Status

Fast, powerful and easy to use component datetime picker for VueJS. The component includes localization, highlight and disable date, 12/24-hour time, inline mode, etc.

Demo

See demo here

vue-datetime-picker

Requirements

  • Vue.js ^2.5.0

Usage

npm install vue-vanilla-datetime-picker --save
import DateTimePicker from 'vue-vanilla-datetime-picker';

Vue.component('date-time-picker', DateTimePicker);
@import "node_modules/vue-vanilla-datetime-picker/dist/DateTimePicker"

Props:

NameRequiredTypeDefaultDescription
v-model, value*String, Date, DateTime (luxon)Value
value-formatStringyyyy-LL-dd HH:mm:ssValue format
max-dateString, Date, DateTime (luxon)nullMax date
min-dateString, Date, DateTime (luxon)nullMin date
constraints-formatStringyyyy-LL-ddConstraints format
localeStringenSet locale.
inlineBooleanfalseEnable inline mode.
disabledBooleanfalseDisable datetime picker.
formatStringyyyy-LL-dd HH:mmDisplay format.
time-pickerBooleantrueShow time picker.
hour-timeNumber24Hour in 12/24-hour time. Values: '12', '24'.
no-toggle-time-pickerBooleanfalseNo toggle time picker button.
only-time-pickerBooleanfalseShow only time picker.
start-from-sundayBooleanfalseSet Sunday as first day of week.
minute-stepNumber1Set step for minute.
seconds-pickerBooleanfalseShow second picker.
initial-viewStringdaysInitial view: 'days', 'months', 'years'
initial-view-dateString, Date, DateTime (luxon)daysInitial date view
main-button-classStringClass for main button.
disabled-datesArray[]Array of disabled dates.
highlightedArray[]Array of highlighted dates. Example: { date: '2018-09-17', class: 'highlighted' }
auto-closeBooleanfalseClose date picker after select date.
clear-buttonBooleanfalseShow "Clear" button.
close-buttonBooleanfalseShow "Close" button.
today-buttonBooleanfalseShow "Today" button.
value-typeStringAutoSet value type. Types: 'Auto', 'String', 'Date', 'Luxon'.
empty-valueAny''Set empty value for clear button.

Slots:

NameDescription
choose-dateFor main button if date not selected.
formatted-datetimeFor main button if date selected.
dateFor date button.
timeFor time button.
months-prevFor previous month button.
months-nextFor next month button.
years-prevFor previous year button.
years-nextFor next year button.
decades-prevFor previous decade button.
decades-prevFor next decade button.
hours-upFor hours up button.
hours-downFor hours down button.
minutes-upFor minutes up button.
minutes-downFor minutes down button.
seconds-upFor seconds up button.
seconds-downFor seconds down button.
meridiems-upFor meridiems up button.
meridiems-downFor meridiems down button.
clearFor clear button.
closeFor close button.
todayFor today button.

Events:

Name
close
open
change-month
change-year
change-decade

Methods:

NameDescription
openOpen datetime picker
closeClose datetime picker

What about RTL support?

If you need an RTL version of component for your project, recommend use PostCSS plugin which is called postcss-rtl.

Development

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build-lib
1.2.0

3 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago