Jquery Datepicker Chrome -
when using jquery ui datepicker, encouter problem when used in google chrome: when enter date day higher 12, not accept valid date, because chrome thinks dateformat mm/dd/yyyy. tried solve adding code try force date settings dd/mm/yyyy
$('.date').datepicker({ dateformat: "dd/mm/yy" });
is there way resolve issue, our datepicker accept dd/mm/yyyy values? have issue in google chrome, datefix works firefox, ie & safari. using aspx & mvc3 project.
if solve our issue, great
thanks
i have had same problem , related webkit based web browsers. if set uppercase m textbox show moth letters. best solution me override validate date function jquery.validate.js
create jquery.validate.date.js , ensure loaded after jquery.validate.js
add following code jquery.validate.date.js
$(function() { $.validator.methods.date = function (value, element) { if ($.browser.webkit) { //es - chrome not use locale when new date objects instantiated: var d = new date(); return this.optional(element) || !/invalid|nan/.test(new date(d.tolocaledatestring(value))); } else { return this.optional(element) || !/invalid|nan/.test(new date(value)); } }; });
Comments
Post a Comment