Instructions for use:
You need to introduce the plug-in calendar.js/calendar.min.js
You need to introduce the calendar.css style sheet, you can customize the skin you want
This calendar plug-in supports cmd modularization
Call as follows:
xvDate({ 'targetId':'date1',//时间写入对象的id 'triggerId':['date1','dateBtn1'],//触发事件的对象id 'alignId':'datesWrap1',//日历对齐对象 'format':'-',//时间格式 默认'YYYY-MM-DD HH:MM:SS' 'min':'2014-09-20 10:00:00',//最大时间 'max':'2014-10-30 10:00:00'//最小时间 });
Parameter description:
targetId: The id of the date writing object, cannot be empty
triggerId : The id of the object that triggers the event, if not set, the default is targetId
alignId: The alignment reference of the calendar box, if not set, the default is targetId
hms: Whether the hours, minutes and seconds are turned on, the default value is 'on'. Turn on hours, minutes and seconds (2014-09-20 10:00:00), 'off' means turn off hours, minutes and seconds mode (2014-09-20)
format: The default value for date format 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 is the same as The previous time format remains
zIndex: maximum time limit, calendar box level, default 9999
If you need to use modularity, just import it into the dependent modules
For example:
define('mod1',[],function(require, exports, module){ var xvDate = require("xvDate"); })
The above is the entire content of this article, I hope you all like it.
For more lightweight native js calendar plug-in calendar.js usage guide related articles, please pay attention to the PHP Chinese website!