The original JS calendar code on the Web page, the mouse clicks on the text hint, will display a calendar window with years, can adjust the year, month, select date, etc., used on the Web page to facilitate the choice of dates, improve the user experience. All major browsers can operate normally, the need for small partners can refer to.
Instructions for use:
Need to introduce Plug-ins calendar.js/calendar.min.js
Need to introduce the CALENDAR.CSS style sheet, you can customize the skin you want
This calendar plugin supports CMD modularity
Call the following:
The code is as follows:
Xvdate ({
' Targetid ': ' date1 ',//time to write the ID of the object
' Triggerid ': [' date1 ', ' DATEBTN1 '],//object ID that triggers the event
' Alignid ': ' DatesWrap1 ',//Calendar Alignment Object
' Format ': '-',//Time format default ' Yyyy-mm-dd HH:MM:SS '
' min ': ' 2014-09-20 10:00:00 ',//MAX time
' Max ': ' 2014-10-30 10:00:00 '//min time
});
Parameter description:
Targetid: Date Write ID of object, cannot be empty
Triggerid: The object ID that triggers the event, or defaults to Targetid if not set
Alignid: The alignment datum of the Calendar box, or default to Targetid if not set
HMS: Whether the time and minutes are open, the default is ' on ' to indicate seconds (2014-09-20 10:00:00), and ' off ' indicates the time of the shutdown (2014-09-20)
Format: The default value for date formats is '-' (2014-09-20), '/' means (2014/09/20)
min: Min time limit, Min's time format and the previous time format remains
Max: Max time limit, Max's time format and previous time format remain
ZIndex: Maximum time limit, calendar box level, default 9999
If you need to use modularity in the modules you need to rely on
Such as:
The code is as follows:
Define (' Mod1 ', [],function (Require, exports, module) {
var xvdate = require ("Xvdate");
})
Download Address
The above mentioned is the entire content of this article, I hope you can enjoy.