资源说明:Easy date entry into form input elements
=DateBox.js ====by Jakob KruseFor easy date entry into form input elements. ==Based on * A rewrite by Will Rickards (2005-02-04) of: * 'Magic' date parsing, by Simon Willison (6th October 2003) http://simonwillison.net/2003/Oct/6/betterDateInput/ ==Usage DateBox.register(obj); Where 'obj' is an element, or the id of one. ==What you get The input field will recognize date formats such as: * today * tomorrow * yesterday * last tuesday * next saturday * 4 * 4th jan * 4th jan 2010 * jan 4 * jan 4 2010 * 1-4 * 1-4-10 * 1-4-2010 * 2010-4-1 ... or variantions thereof depending on the chosen locale. Also: * Double-clicking the field (when empty) will insert todays date * Scrolling the mouse wheel while hovering the field (when not empty) will increase or decrease the date * Pressing or in the field (when not empty) will increase or decrease the date A span will be created dynamically after the input element. The span will use the CSS classes 'DateBoxControlMsg' and 'DateBoxControlErrorMsg'. This span will contain either a formatted date (according to your browser locale), or an error message if the contents of the input can't be parsed, or is not a valid date. ==History ===1.5 * First release on github. * Added localization support, English and Danish locales. * Removed external dependencies. * Chrome and Safari support. * Doubleclick inserts todays date. * Supports both US and European date formats (not at the same time though) ===1.4 * Some date formats gave errors in Mozilla, now fixed. * Added mouse wheel scroll handling. ===1.3 * Empty input no longer shows error. ===1.2 * Added a few new formats.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。