A lightweight and responsive date picker for Vue.js – vue-datetime

Category: Vue.js VueJS Date & Time | August 16, 2021
Author: mariomka
Official Page: Go to website
Last Update: August 16, 2021
License: MIT

vue date time picker

Description:

A simple, lightweight and responsive date picker for Vue.js, which is mobile friendly, having option to choose either you want date picker or datetime picker.

You may also like:

How can I use it?

1. Install the component with npm or yarn.

#npm
npm install --save luxon vue-datetime weekstart

#yarn
yarn add luxon vue-datetime weekstart

2. Import the required components.

import Vue from 'vue'
import { Datetime } from 'vue-datetime'
// You need a specific loader for CSS files
import 'vue-datetime/dist/vue-datetime.css'

4. Register the component.

Vue.use(Datetime)

5. Include the component in your template file.

<datetime v-model="date"></datetime>

And, you are done. 🙂