我使用jqueryui.com的jQuery datepicker,我有一个问题将日历更改为瑞典语,我有这个代码:
<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: