The problem is that behind the scenes, validation is performed by jQuery. So, the key is to tell jQuery validator that you will use the dd / MM / yyyy format.
There are several ways to do this. The easiest way is to simply override the validator function (for dates) with the simpe setting:
jQuery(function ($) { $.validator.addMethod('date', function (value, element) { $.culture = Globalize.culture("en-AU"); var date = Globalize.parseDate(value, "dd/MM/yyyy", "en-AU"); return this.optional(element) || !/Invalid|NaN/.test(new Date(date).toString()); }); });
An alternative would be to use a globalization library for jQuery. There is a globalization library that you can use here .
When you have the library, include these files:
globalize.js globalize.culture.en-AU.js
Then override the validator function:
<script type="text/javascript"> $(function () { $.validator.methods.date = function (value, element) { Globalize.culture("en-AU"); </script>
source share