LaravelLaravel & VueJsVueJs

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.




Source link
★ READ ALSO ★  Alpha PHP Router | A PHP-MVC-Architectural Laravel Standalone

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close