a js calendar library, whick can pick day, week or month
npm install x-calendar --save
-
Import:
import Calendar from 'x-calendar'
orconst Calendar = require('x-calendar')
-
Initialize the calendar
let calendar = new Calendar(el, options)
-el always an input tag -options
options = {
monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
dayStart: 0,
date: now,
pickerCb () {},
renderCb () {},
type: 'day',
selectMode: { type: ['day'] },
disablePast: false,
disableFuture: false,
rangeEnd: '2018-03-28',
rangeBegin: '2018-03-25',
timePick: false,
defaultFill: true,
align: 'left',
disableSelect: false,
currentDay: '2018,03,25'
}