docs: 📅 DatePicker change start day of week (#24605)

close #5605
close #19229
close #17982
close #3877
close #11552
close #10644
close #12194
This commit is contained in:
偏右 2020-05-31 01:01:53 +08:00 committed by GitHub
parent 8e20fe6779
commit a9b95fe63b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View File

@ -172,4 +172,16 @@ Added in `4.1.0`.
- [When set mode to DatePicker/RangePicker, cannot select year or month anymore?](/docs/react/faq#When-set-mode-to-DatePicker/RangePicker,-cannot-select-year-or-month-anymore?)
- [How to use DatePicker with customize date library like dayjs](/docs/react/replace-moment#DatePicker)
- [How to use DatePicker with customize date library like dayjs?](/docs/react/replace-moment#DatePicker)
- How to modify start day of week?
Please use correct [language](/docs/react/i18n) ([#5605](https://github.com/ant-design/ant-design/issues/5605)), or update moment `locale` config: https://codesandbox.io/s/moment-day-of-week-b24k5
```js
moment.locale('en', {
week: {
dow: 1,
},
});
```

View File

@ -174,4 +174,17 @@ import 'moment/locale/zh-cn';
- [当我指定了 DatePicker/RangePicker 的 mode 属性后,点击后无法选择年份/月份?](/docs/react/faq#当我指定了-DatePicker/RangePicker-的-mode-属性后,点击后无法选择年份/月份?)
- [如何在 DatePicker 中使用自定义日期库(如 dayjs ](/docs/react/replace-moment#DatePicker)
- [如何在 DatePicker 中使用自定义日期库(如 dayjs ](/docs/react/replace-moment#DatePicker)
- 如何修改周的起始日?
请使用正确的[语言包](/docs/react/i18n)[#5605](https://github.com/ant-design/ant-design/issues/5605)),或者修改 moment 的 `locale` 配置https://codesandbox.io/s/moment-day-of-week-b24k5
```js
moment.locale('en', {
// 注意请修改你正在使用的 locale 语言,比如 zh-cn
week: {
dow: 1,
},
});
```