Closed burnalias closed 8 years ago
Hi, the same thing is happening with me, we have the client side validation failing because the validator is taking the american date format. Working in all browsers except for Chrome
Hi, I had the same problem and I've fixed using globalize.js (http://github.com/jquery/globalize)
<script src="@Url.Content("~/Scripts/globalize.js")" type="text/javascript">
<script src="@Url.Content("~/Scripts/globalize.culture.en-GB.js")" type="text/javascript"></script>
<script type="text/javascript">
Globalize.culture("en-GB");
$.validator.methods.date = function (value, element) {
return this.optional(element) || Globalize.parseDate(value);
};
I have a datetime field that i had decorated with the date annotation. having that validation caused chrome to not work with date fields (switching the culture info to american for some reason). don't want to even tell you how long it took me before i tried commenting out your attribute and everything started working
this was with the client side validation in asp.net mvc3