-
- Notifications
You must be signed in to change notification settings - Fork 54k
Closed
react-component/picker
#20Labels
4.xIn Ant Design 4.0In Ant Design 4.0🐛 BugAnt Design Team had proved that this is a bug.Ant Design Team had proved that this is a bug.👷🏻♂️ Someone working on it
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
https://next.ant.design/components/calendar-cn/#components-calendar-demo-customize-header
Steps to reproduce
- 随便点击一个日期
- 月份下拉框由 1-12 变成 英文月份
What is expected?
- 月份正常显示
What is actually happening?
- 月份显示异常
| Environment | Info |
|---|---|
| antd | 4.0.0-rc.0 |
| React | The latest |
| System | mac |
| Browser | chrome |
预计解决方案
自己研究了一下,预计可能是这个原因,可参考一下。(自己是改不了啦😂😂)
-
点击日期,发现
headerRender方法中的value. _locale. _abbr变成了en,初始化时为zh-cn -
查询
headerRender中value来源于generateConfig.getNow() -
import { GenerateConfig } from 'rc-picker/lib/generate'; -
查询
rc-picker, 地址:https://github.com/react-component/picker/blob/de1b67696972cfd7637dd019d193569adbbafebc/src/generate/dayjs.ts#L51 -
代码为
getNow: () => dayjs(),没有指定locale() -
之前好像用的
moment现在换成了dayjs
Metadata
Metadata
Assignees
Labels
4.xIn Ant Design 4.0In Ant Design 4.0🐛 BugAnt Design Team had proved that this is a bug.Ant Design Team had proved that this is a bug.👷🏻♂️ Someone working on it