我正在使用 jqueryui.com 中的 jQuery 日期选择器,并且在将日历更改为瑞典语时遇到问题,我有以下代码:
<script type="text/javascript">
$(function() {
$.datepicker.setDefaults($.datepicker.regional['sv']);
$("#StartDate").datepicker();
$('#StartDate').datepicker('option', 'dateFormat', 'yy-mm-dd');
});
</script>
它仍然显示为英文日历。
可能缺少什么?
最佳答案
也许您没有语言文件:
语言文件位于:https://github.com/jquery/jquery-ui/tree/master/ui/i18n
A new localization should be created in a separate JavaScript file named ui.datepicker-.js. Within a document.ready event it should add a new entry into the $.datepicker.regional array, indexed by the language code, with the following attributes:
关于jquery-ui - JQuery 日期选择器语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1865091/