JQuery Laydate Date Control

Source: Internet
Author: User

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.

    1. Version Laydate 1.1

    2. Bambo Yin

    3. GitHub

Online example

Instance Preview Laydate-js date control with time plugin demo

Instance Preview Laydate Date Picker instance Demo

Introducing Files
    1. <script src="Laydate.js"></script>
CopyHow to use
    1. <input id< Span class= "pun" >= "hello"  class=< Span class= "ATV" > "Laydate-icon" >
    2. <SCRIPT>
    3. Laydate ({
    4. Elem:  ' #hello '
    5. Event:  ' focus '
    6. });
    7. </SCRIPT>
CopyParameter description

One, the core method: Laydate (options);

  1. The options is an object that contains the following key: ' default value 'elem: ' #id ',
  2. Element selector for the date to be displayed
  3. Event: ' click ',
  4. Triggering events
  5. Format: ' yyyy-mm-dd hh:mm:ss ',
  6. Date format
  7. Istime: false,
  8. Whether to turn on time selection
  9. Isclear: true,
  10. Whether to display empty
  11. Istoday: true,
  12. Whether to show today
  13. Issure: true,
  14. Whether to display confirmation Festival: true //Whether the festival is displayed
  15. Min: ' 1900-01-01 00:00:00 ',
  16. Minimum date
  17. Max: ' 2099-12-31 23:59:59 ',
  18. Maximum Date
  19. Start: ' 2014-6-15 23:00:00 ',
  20. Start date
  21. Fixed: false,
  22. is fixed in the viewable area
  23. ZIndex: 99999999,
  24. CSS Z-index
  25. Choose: function(dates) { //callback to select a good date
  26. }
Copy

Second, other methods/properties

  1. Laydate. V //Get Laydate version number
  2. Laydate.  Skin(lib); //Load skin, parameter lib for skin name
  3. /*
  4. 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.
  5. such as Laydate.now (-2) will return the day before yesterday, Laydate.now (3999634079890) will return 2096-09-28
  6. */
  7. Layer.  Now(timestamp, format); //This method offers a wide range of functions and is recommended for flexible use.
  8. Laydate.  Reset(); //Reset Calendar control coordinates, typically used when the page DOM structure changes. No reference
Copy

Download

JQuery Laydate Date Control

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.