diff --git a/components/config-provider/index.en-US.md b/components/config-provider/index.en-US.md index d69b4da162..01048cb940 100644 --- a/components/config-provider/index.en-US.md +++ b/components/config-provider/index.en-US.md @@ -55,7 +55,12 @@ Some components use dynamic style to support wave effect. You can config `csp` p #### Does the locale problem still exist in DatePicker even if ConfigProvider `locale` is used? -Please make sure you set moment locale by `moment.locale('zh-cn')` or that you don't have two different versions of moment. +Please make sure you set moment locale or that you don't have two different versions of moment. + +```js +import 'moment/locale/zh-cn'; +moment.locale('zh-cn'); +``` #### Modal throw error when setting `getPopupContainer`? diff --git a/components/config-provider/index.zh-CN.md b/components/config-provider/index.zh-CN.md index b0cbbc7e53..c82f786670 100644 --- a/components/config-provider/index.zh-CN.md +++ b/components/config-provider/index.zh-CN.md @@ -56,7 +56,12 @@ return ( #### 为什么我使用了 ConfigProvider `locale`,时间类组件的国际化还有问题? -请检查是否正确设置了 `moment.locale('zh-cn')`。或者是否有两个版本的 moment 共存。 +请检查是否正确设置了 moment 语言包,或者是否有两个版本的 moment 共存。 + +```js +import 'moment/locale/zh-cn'; +moment.locale('zh-cn'); +``` #### 配置 `getPopupContainer` 导致 Modal 报错? diff --git a/package.json b/package.json index 24374c2816..54d2de6680 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "copy-to-clipboard": "^3.2.0", "css-animation": "^1.5.0", "lodash": "^4.17.13", - "moment": "~2.25.1", + "moment": "~2.25.3", "omit.js": "^1.0.2", "prop-types": "^15.7.2", "raf": "^3.4.1",