GitHub - ankurk91/vue-flatpickr-component: Vue.js component for Flatpickr datetime picker :calendar: (original) (raw)

Vue FlatPickr Component

downloads jsdelivr npm-version github-tag build codecov license ts

Vue.js component for Flatpickr date-time picker.

Demo or JSFiddle

Version matrix

Vue.js version Package version Branch
2.x 8.x 8.x
3.x 12.x main

Features

Installation

npm install vue-flatpickr-component@^11

Usage

Minimal example

Detailed example

Using Bootstrap input group and Font Awesome icons

Select a date
Toggle Clear
Selected date is - {{date}}

Events

<flat-pickr v-model="date" @on-change="doSomethingOnChange" @on-close="doSomethingOnClose"/>

Available props

The component accepts these props:

Attribute Type Default Description
v-model String / Date Object / Array / Timestamp / null null Set or Get date-picker value (required)
config Object { wrap: false } Flatpickr configuration options
events Array Array of sensible events Customise the events to be emitted

Use in browser with CDN

Run examples on your localhost

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

License

MIT License