在jQuery UI Datepicker中设置星期几开始? [英] Set start day of the week in jQuery UI Datepicker?
本文介绍了在jQuery UI Datepicker中设置星期几开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在查找jQuery UI Datepicker的文档( http://jqueryui.com/demos/datepicker/),但是我找不到如何将一周的第一天设置为星期一.
I'm looking through the docs for the jQuery UI Datepicker (http://jqueryui.com/demos/datepicker/), but I can't find how to set the first day of the week as Monday.
应用区域设置会将星期一设置为一周的第一天,但这也会更改语言.
Applying regional settings will set Monday as first day of the week, but this will also change the language.
推荐答案
尝试"firstDay"选项(在选项"标签中):
Try the firstDay option (in the options tab):
//getter
var firstDay = $('.selector').datepicker('option', 'firstDay');
//setter
$('.selector').datepicker('option', 'firstDay', 1);
这篇关于在jQuery UI Datepicker中设置星期几开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文