When using jQuery UI Datepicker, we encouter a problem when used in Google Chrome: when we enter a date with a day higher than 12, it does not accept it as a valid date, th
You've got to override default 'en-US' date validation with 'en-GB' date validation.
Solution:
add a "jquery.validate.date.js" file in your project and put the following code in it:
//To Fix jQuery date format 'en-GB' validation problem in Chrome
$(function () {
$.validator.addMethod(
"date",
function (value, element) {
var bits = value.match(/([0-9]+)/gi), str;
if (!bits)
return this.optional(element) || false;
str = bits[1] + '/' + bits[0] + '/' + bits[2];
return this.optional(element) || !/Invalid|NaN/.test(new Date(str));
},
"Please enter date in valid format [dd/mm/yyyy]"
);
});
and make sure it load after the 'jquery.validate.min.js':