Lightweight native js calendar plug-in calendar. js User Guide, jscalendar. js
Instructions for use:
You need to introduce the plug-in calendar. js/calendar. min. js.
You must import the calendar.css style sheet to customize your desired skin.
The calendar plug-in supports cmd modularization.
Call the following code:
Copy codeThe Code is as follows:
XvDate ({
'Targetid': 'date1', // id of the time written to the object
'Triggerid': ['date1', 'datepart1'], // the id of the object that triggers the event
'Alignid': 'dateswrap1', // calendar alignId
'Format': '-', // time format default 'yyyy-MM-DD HH: MM: ss'
'Min': '2017-09-20 10:00:00 ', // maximum time
'Max ': '2017-10-30 10:00:00' // minimum time
});
Parameter description:
TargetId: id of the date written object. It cannot be blank.
TriggerId: the id of the object that triggers the event. If this parameter is not set, the default value is targetId.
AlignId: alignId of the Calendar box. If this parameter is not set, the default value is targetId.
Hms: Indicates whether to enable the time/minute/second mode. The default value is 'on', which indicates that the time/minute/second mode is enabled (10:00:00), and 'off' indicates that the time/minute/second mode is disabled)
Format: the default value of the date format is '-' (). '/' indicates)
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 consistent with the previous time format.
ZIndex: maximum time limit. The hierarchy of the Calendar box. The default value is 9999.
If you need to use modularization, you can use it to introduce the modules that require dependency.
For example:
Copy codeThe Code is as follows:
Define ('mod1', [], function (require, exports, module ){
Var xvDate = require ("xvDate ");
})
The above is all the content of this article. I hope you will like it.