Reputation: 2639
My client-side validation fails when I use the dd/MM/yyyy format in my model and dd/MM/yy in jQuery. However if I do the same thing with MM/dd/yyyy and MM/dd/yy the validation goes through without any problems. What is wrong here? How can I get this to work?
Thanks, Leo
Upvotes: 0
Views: 2562
Reputation: 1713
Take a look at this answer.
Basically you need to localize jquery for the language you want. You do this by including a javascript localization script file that will take care of your formats and currency for example.
Upvotes: 1
Reputation: 172638
I think the problem is related to jquery.validate
and its inability to parse date string with "dd/MM/yyyy"
format.
You may check out this for reference.
Upvotes: 1