JQuery UI 日期选择器(从星期一开始几周)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5003362/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JQuery UI datepicker ( start weeks from Monday)
提问by Mellon
I am using jQuery UI datepicker, I know I can customize this datepicker in this way:
我正在使用 jQuery UI datepicker,我知道我可以通过这种方式自定义这个 datepicker:
$("#reserve_date").datepicker({
beforeShowDay: no_disabled_Days
});
currently, my datapicker calendar start weeks from Sunday, I would like it starts weeks from Monday, how to do??
目前,我的数据选择器日历从星期日开始几周,我希望它从星期一开始几周,怎么办?
回答by David says reinstate Monica
$( ".selector" ).datepicker({ firstDay: 1 });
jQuery UI Reference; see the link for a slightly more detailed explanation.
jQuery UI 参考;请参阅链接以获得更详细的解释。
For inline reference:
内联参考:
Sunday 0
Monday 1
Tuesday 2
Wednesday 3
Thursday 4
Friday 5
Saturday 6