I have the globalize.js file, and I want to force the dateformat to dd/mm/yyyy at a global level somewhere so then all jquery validation and datepicker etc. will pickup this dateformat.
Is this possible?
I have the globalize.js file, and I want to force the dateformat to dd/mm/yyyy at a global level somewhere so then all jquery validation and datepicker etc. will pickup this dateformat.
Is this possible?
I believe the following applied in your layout would suffice:
<script type="text/javascript">
$(function () {
$.validator.methods.date = function (value, element) {
return this.optional(element) || Globalize.parseDate(value, "dd/MM/yyyy") !== null;
}
});
</script>