Click here to Skip to main content
15,922,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

1)I Have To compare Dates Of Two Formats: mm-dd-yyyy format to mm/dd/yyyy Format , in Jquery.
and
2)
function validate_date(date) { 
   var pattern = new RegExp(/\b\d{1,2}[\/-]\d{1,2}[\/-]\d{4}\b/); 
   return pattern.test(date); 
}


the above function i use it allows mm/dd/yyy format. it allows month>12 and date>31 i want to restrict that one
please advice how to validate in jquery.
please give answers for above two questions.
Posted
Updated 18-Apr-11 15:01pm
v2

1 solution

Hi, for jQuery validation, check this plugin.

http://plugins.jquery.com/content/better-date-validation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900