Automatic Date Completion

Automatic Date Completion
 点击下载

For use in an <input type="text" /> field. It lets the user only type in 10 and the input will be transformed into 2007-12-10.

Only typing a number will get the month and year. It presumes it's in the future, so if you type 10 on the eleventh of November, it will return December (2007-12-10 that is).

Works great with the

One way of use

  1. $("input").blur(function () { 
  2. var value = $(this).val(); 
  3.  
  4. $(this).dateCompletion(value); 
  5. }); 

 

转载请注明:代码家园 » Automatic Date Completion

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)