[Update] dateRange插件支持i18n

This commit is contained in:
Bai
2020-01-06 18:21:05 +08:00
parent 05adb4e95f
commit f702fc7d93
4 changed files with 29 additions and 10 deletions

View File

@@ -18,9 +18,6 @@ $(document).ready(function(){
if ($('.tooltip')[0]) {
$('.tooltip').tooltip();
}
var userLang = navigator.language || navigator.userLanguage;
if (userLang.indexOf('zh') !== -1) {
$.fn.select2.defaults.set('language', 'zh-CN')
}
$.fn.select2.defaults.set('language', getUserLang())
});
</script>