protected void Application_BeginRequest() { System.Globalization.CultureInfo newCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); newCulture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; newCulture.DateTimeFormat.DateSeparator = "/"; System.Threading.Thread.CurrentThread.CurrentCulture = newCulture; }
$.validator.addMethod('date', function (value, element, params) { if (this.optional(element)) { return true; } var ok = true; try { $.datepicker.parseDate('dd/mm/yy', value); } catch (err) { ok = false; } return ok; });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)