6
我发现这个有用的代码允许英国日期在Chrome中工作,但我不知道如何实现它。它覆盖默认的日期功能。覆盖jQuery的日期
date: function(value, element) {
//ES - Chrome does not use the locale when new Date objects instantiated:
//return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
var d = new Date();
return this.optional(element) || !/Invalid|NaN/.test(new Date(d.toLocaleDateString(value)));
},
我如何将此添加到jQuery验证以覆盖默认功能。
Here is where我找到了代码示例
我会建议使用类似的东西:http://www.datejs.com/ – Mrchief
如果你打算复制另一个问题的答案,至少给这个人的功劳。 (你甚至复制了他们的拼写错误)http://stackoverflow.com/questions/5966244/jquery-datepicker-chrome –