jQuery

Fix date validation in chrome for UK/AU date format (dd/MM/yyyy)

And doesn't cause the error: Uncaught RangeError: Invalid language tag

$.validator.methods.date = function (value, element) {
    var dateParts = value.split('/');
    var dateStr = dateParts[2] + '-' + dateParts[1] + '-' + dateParts[0];
    return this.optional(element) || !/Invalid|NaN/.test(new Date(dateStr));
};

Sponsored by