Crafted based on native JavaScript, she is compatible with all major browsers including IE6. She has elegant internal code, a good performance experience, and a perfect skin system, and fully open source, you can freely access the development of source code, a sweep of some traditional date control closed and narrow. Laydate the spirit of resource-sharing and the endless pursuit of Web calendar, continuing the Layui has always been simple and easy to use. She follows the LGPL agreement and you can use her for any personal item for free.
Version Laydate 1.1
Bambo Yin
GitHub
Online example
Instance Preview Laydate-js date control with time plugin demo
Instance Preview Laydate Date Picker instance Demo
Introducing Files
- <script src="Laydate.js"></script>
CopyHow to use
- <input id< Span class= "pun" >= "hello" class=< Span class= "ATV" > "Laydate-icon" >
- <SCRIPT>
- Laydate ({
- Elem: ' #hello '
- Event: ' focus '
- });
- </SCRIPT>
CopyParameter description
One, the core method: Laydate (options);
- The options is an object that contains the following key: ' default value 'elem: ' #id ',
- Element selector for the date to be displayed
- Event: ' click ',
- Triggering events
- Format: ' yyyy-mm-dd hh:mm:ss ',
- Date format
- Istime: false,
- Whether to turn on time selection
- Isclear: true,
- Whether to display empty
- Istoday: true,
- Whether to show today
- Issure: true,
- Whether to display confirmation Festival: true //Whether the festival is displayed
- Min: ' 1900-01-01 00:00:00 ',
- Minimum date
- Max: ' 2099-12-31 23:59:59 ',
- Maximum Date
- Start: ' 2014-6-15 23:00:00 ',
- Start date
- Fixed: false,
- is fixed in the viewable area
- ZIndex: 99999999,
- CSS Z-index
- Choose: function(dates) { //callback to select a good date
- }
Copy
Second, other methods/properties
- Laydate. V //Get Laydate version number
- Laydate. Skin(lib); //Load skin, parameter lib for skin name
- /*
- Layer.now supports multi-type parameters. The timestamp can be a couple of days or a time stamp. Format is a date and is empty with the default "-" split.
- such as Laydate.now (-2) will return the day before yesterday, Laydate.now (3999634079890) will return 2096-09-28
- */
- Layer. Now(timestamp, format); //This method offers a wide range of functions and is recommended for flexible use.
- Laydate. Reset(); //Reset Calendar control coordinates, typically used when the page DOM structure changes. No reference
Copy
Download
JQuery Laydate Date Control