Use the Flatpickr component for Vue.js

Vue-Flatpickr

Check out this implementation of Flatpickr for Vue.js. Use the datepicker component in this live demo.

Example

Install

npm install vue-flatpickr --save

Usage

import VueFlatpickr from 'vue-flatpickr'
import 'vue-flatpickr/theme/dark.css'

Vue.use(VueFlatpickr)

Use props to pass an option object to Vue-Flatpickr

data () {
    return {
        fpOptions: {
            utc: true,
            defaultDate: '2016-12-27T16:16:22.585Z',
            enableTime: true
        }
    }
}

Bind to it in the template

<Flatpickr :options="fpOptions" />

Vue-Flatpickr supports all options as the Official Document, except the "Custom elements and input groups".

View the source code on GitHub.