更改Angular ui-bootstrap datepicker日期
目前,ui-bootstrap datepicker弹出窗口命令星期一星期一。
我有一个客户的请求来重新排序他们太阳星期六
Currently the ui-bootstrap datepicker popup orders the days of the week Mon-Sun. I have a request from a customer to reorder them Sun-Sat
有趣的是,在ui-bootstrap页面上,内联示例有Sun-Mon命令但是弹出窗口是Mon-Sun。
Interestingly, on the ui-bootstrap page, the inline example has the Sun-Mon order but the popup is Mon-Sun.
有没有办法更改弹出窗口中的日期顺序?
我没有在我的谷歌搜索中找到关于该主题的任何信息。
Is there a way to change the day order in the popup? I have not found any info on that topic in my googling.
安德鲁,在 Datepicker文档,在弹出设置小标题下,它说datepicker的选项可以作为JSON传递使用datepicker-options属性,这是我处理您遇到的同样问题的关键。
Andrew, in the Datepicker docs, under the "Popup Settings" subheading, it says "Options for datepicker can be passed as JSON using the datepicker-options attribute", which was the key piece for me in tackling the same problem you're facing.
请参阅此JSFiddle ,它简化了来自angular-ui.github.io的示例代码,并包含我认为您需要的位。请注意,您需要更改为骆驼案例startingDay拼写:
See this JSFiddle, which simplifies the example code from angular-ui.github.io, and contains the bits I think you need. Note that you need to change to camel case "startingDay" spelling:
$scope.dateOptions = {
formatYear: 'yy',
showWeeks: false,
startingDay: 0
};