我在项目中使用DateTimePicker。我想改变语言。如何在此示例中使用https://github.com/jquery/jquery-ui/blob/master/ui/i18n/datepicker-tr.js插件运行它。提前谢谢..
$('#appoimentDate').datetimepicker({
format: "dd.mm.yyyy hh:ii",
language: "tr"
});
答案 0 :(得分:0)
这应该有效。将它直接放在datetimepicker选项中。
$('#appoimentDate').datetimepicker({
format: "dd.mm.yyyy hh:ii",
closeText: "kapat",
prevText: "<geri",
nextText: "ileri>",
currentText: "bugün",
monthNames: [ "Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık" ],
monthNamesShort: [ "Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara" ],
dayNames: [ "Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi" ],
dayNamesShort: [ "Pz","Pt","Sa","Ça","Pe","Cu","Ct" ],
dayNamesMin: [ "Pz","Pt","Sa","Ça","Pe","Cu","Ct" ],
weekHeader: "Hf",
dateFormat: "dd.mm.yy",
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ""
});
答案 1 :(得分:0)
如果您在HTML中datepicker-tr.js
之后加载jquery-ui.js
,那么它应该已经使用tr
语言。
例如
<script src="jquery.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="datepicker-tr.js"></script>
查看我创建的Plunker Demo。