Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

官网推荐使用 Day.js 替换 momentjs后DataPicker组件显示不正确 #18

Closed
1 task
shen1986 opened this issue Mar 28, 2020 · 6 comments
Closed
1 task

Comments

@shen1986
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://github.com/shen1986/antd-datapick-test

Steps to reproduce

使用 antd-dayjs-webpack-plugin 插件用 Day.js 替换 momentjs .
<DatePicker
showTime={{ format: 'HH:mm:ss' }}
format="YYYY-MM-DD HH:mm:ss"
/>

What is expected?

日历能正常显示

What is actually happening?

所有的日期都变成今天了

Environment Info
antd 4.0.4
React react 16.13.1
System Mac
Browser chrome 80.0.3987.149

是不是有什么配置或者写法上有问题,请指导下

@afc163 afc163 transferred this issue from ant-design/ant-design Mar 28, 2020
@iamkun
Copy link
Collaborator

iamkun commented Mar 30, 2020

问题已复现 请先使用 0.0.9 版插件

@iamkun
Copy link
Collaborator

iamkun commented Mar 30, 2020

等这个PR合并之后 应该就正常了 react-component/picker#42

@shen1986
Copy link
Author

等这个PR合并之后 应该就正常了 react-component/picker#42

好的,谢谢

@iamkun
Copy link
Collaborator

iamkun commented Apr 3, 2020

Fixed. Please re-install antd, and make sure rc-pick's version newer than v1.4.3

@tengyuanOasis
Copy link

请问dayjs兼容antd2.x版本吗,这么写似乎没用
new AntdDayjsWebpackPlugin({ preset: 'antdv2' })

@iamkun
Copy link
Collaborator

iamkun commented Aug 27, 2020

@JuntengMa 没有测试过 antd 2.x 版本 可以传入 preset: 'antdv3' 试试看?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants