diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index 7a83397476..e8360aaff0 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -248,8 +248,9 @@ Please use correct [language](/docs/react/i18n) ([#5605](https://github.com/ant- ```js import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; -import 'dayjs/plugin/updateLocale'; +import updateLocale from 'dayjs/plugin/updateLocale'; +dayjs.extend(updateLocale); dayjs.updateLocale('zh-cn', { weekStart: 0, }); diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index ebd1c63fdd..0d5eda09a1 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -243,8 +243,10 @@ export type FormatType = Generic | GenericFn | Array; ```js import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; -import 'dayjs/plugin/updateLocale'; +import updateLocale from 'dayjs/plugin/updateLocale'; + +dayjs.extend(updateLocale); dayjs.updateLocale('zh-cn', { weekStart: 0, });