antd RangePicker 英文状态下的这行星期缩写,只有两个字母,非常奇怪。。。
像这样
这是改过之后的,看起来正常多了 : - )
其实改起来也很简单,只要设置一下moment.local
里的weekdaysMin
就可以了
componentDidMount() {
moment.locale('en',{
week: {
dow: 7
},
weekdaysMin: 'Sun_Mon_Tue_Wen_Thr_Fri_Sat'.split('_'),
})
}
<RangePicker
ranges={{ 'This Month': [moment().startOf('month'), moment().endOf('month')]}}
showTime={{ defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')] }}
style={{ borderRadius: 0, width: 250 }}
format="YYYY/MM/DD HH:mm:ss"
onChange={(dates, dateStrings) => this._dateHandle(dates, dateStrings)}
onOk={this._dateConfirmHandle}
/>