Jquery datetimemask date mask plug-in is released !! Including API help, source code, and examples

Source: Internet
Author: User

The cat is about to go to work in the fifth day of winter. Release it early. If there is a bug, leave a message.

Please keep the copyright statement in the JS file. Thank you!

The remarks in JS are not removed to facilitate mutual communication.

1. Plug-in parameter description

The jquery datetimemask date mask plug-in provides perfect control over Date input. Currently, it supports five mask formats and is successfully debugged under ie6.0 and firefox3.0. This plug-in uses the idea of configuration information, mainly including the following configuration parameters
Safemodel: True, // in safe mode, it cannot be pasted or dragged.
Masktype: "3", // mask type, currently there are 5 types

Isnull: false, // whether all values can be 0

Lawlessmessage: "Your input format is incorrect", // when the input date is invalid and the focus is lost, the plug-in will automatically display this error message to restore the original value.
Onlycontrolkeydown: false, // only controls the input. An invalid date is allowed.
Focuscssname: "", // gets the focus Style
Isnow: false, // whether to obtain the current date
Ismonthstart: false, // whether to obtain the first day of the current month
Whenfocus: function () {}, // callback function when the focus is obtained. No return value.
Whenblur: function () {return true;} // callback function when the focus is lost. Return ture indicates that the extra verification is successful; return false: restores to the previous value.

2. jquery datetimemask date mask plug-in demonstration

The following is a real form, not an image. You can test it directly.

3. server-side controls encapsulated by this plug-in


See my previous articleArticle, With an animated demonstration
The jquery datetimemask date mask plug-in will be released soon and will be presented to friends in the garden as a New Year's Eve!

4. Download the plug-in

Jquery datetimemask1.0

5. features not yet implemented

Because Firefox does not support ondragenter and onpaste, The safemodel attribute is not supported in Firefox.

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.