Jquery Validation in Dates and regular expression

Posted by Srinivas673 under jQuery on 4/18/2011 | Points: 10 | Views : 3932 | Status : [Member] | Replies : 1
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.




Responses

Posted by: Umeshdwivedi on: 4/19/2011 [Member] Starter | Points: 25

Up
0
Down
Hello,
for jQuery validation, check this plugin.

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

Latest Technology Trainer
And Part time software consultant

Srinivas673, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response