Home > Article > Web Front-end > Lightweight native js calendar plug-in calendar.js usage guide_javascript skills
Instructions for use:
Need to introduce the plugin calendar.js/calendar.min.js
You need to introduce the calendar.css style sheet to customize the skin you want
This calendar plug-in supports cmd modularity
Call as follows:
Parameter description:
targetId: The id of the date writing object, cannot be empty
triggerId: The object ID that triggers the event. If not set, the default is targetId
alignId: The alignment base of the calendar box. If not set, it defaults to targetId
hms: Whether the hours, minutes and seconds are turned on. The default value is 'on', which means to turn on the hours, minutes and seconds (2014-09-20 10:00:00), and 'off', which means to turn off the hours, minutes and seconds mode (2014-09-20)
format: Date format. The default value is '-' (2014-09-20), '/' means (2014/09/20)
min: Minimum time limit, the time format of min remains the same as the previous time format
max: maximum time limit, the time format of max remains the same as the previous time format
zIndex: maximum time limit, calendar box level, default 9999
If you need to use modularization, just import the modules you need to depend on
For example:
The above is the entire content of this article, I hope you all like it.