Calendar and date picker component for Vue.js version 2

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

vue calendar and date picker

Description:

A highly customizable, simple and clean layout and lightweight calendar and date picker component for Vue.js, compatible with Vue.js version 2.

How to install and use it?

1. Install the date picker component with npm.

npm install vue2-slot-calendar

2. Import the required components.

// js file
import 'vue2-slot-calendar/lib/calendar.min.css';
import calendar from 'vue2-slot-calendar/lib/calendar';

// vue file
// in ES6 modules
import Calendar from 'vue2-slot-calendar';

3. Register the date picker component.

const VueCalendar = Calendar;

4. Now, add the component in your template file.

<calendar
  :value="value"
  :disabled-days-of-week="disabled"
  :format="format"
  :clear-button="clear"
  :placeholder="placeholder"
  :pane="2"
  :has-input="false"
  :on-day-click="onDayClick2"
  :special-days="_dateMap"
></calendar>

And, you are done. 🙂