我正在使用日期选择器作为签入日期。日期选择器在使用谷歌翻译器时更改日期
我在我的网站上使用Google翻译器。
因此,当我将语言从英语更改为中文或其他语言时,日期选取器值变为NaN/NaN/NaN
。日期选择器格式是mm/dd/yyyy
。
我正在使用日期选择器作为签入日期。日期选择器在使用谷歌翻译器时更改日期
我在我的网站上使用Google翻译器。
因此,当我将语言从英语更改为中文或其他语言时,日期选取器值变为NaN/NaN/NaN
。日期选择器格式是mm/dd/yyyy
。
add notranslate
class jquery.ui.datepicker.js
with class ui-helper-clearfix
。
首先你需要在jQuery UI的JS搜索该
ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all
,或者你可以搜索整个项目,并且比
ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all notranslate
更换所有发生。
关键字notranslate
将阻止您的日历进行翻译。
,当你不能/不想改变jQuery UI的日期选择器的代码,你也可以使用beforeShow回调添加notranslate
类:
beforeShow: function(input, inst) {
inst.dpDiv.addClass('notranslate');
}
与版本测试1.12.0
同样在谷歌网站上有描述https://cloud.google.com/translate/v2/faq#technical –
同样的解决方案也出现在这里.... http://stackoverflow.com/questions/17130370/stopping-google-翻译 - 从 - 翻译 - 日期选择器 –