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

antd3.x WeekPicker 周期显示不正确 #22

Closed
Kol96 opened this issue Apr 24, 2020 · 7 comments · Fixed by iamkun/dayjs#884
Closed

antd3.x WeekPicker 周期显示不正确 #22

Kol96 opened this issue Apr 24, 2020 · 7 comments · Fixed by iamkun/dayjs#884

Comments

@Kol96
Copy link

Kol96 commented Apr 24, 2020

周期无法正确显示

antd: 3.26.15
antd-dayjs-webpack-plugin: 1.0.0
dayjs: 1.8.25

image

@iamkun
Copy link
Collaborator

iamkun commented Apr 26, 2020

@Kol96
Copy link
Author

Kol96 commented Apr 26, 2020

请看本插件的 readme
antd 3.x 版本 需要额外配置 https://github.com/ant-design/antd-dayjs-webpack-plugin#ant-design-3x-notice-ant-design-3x-%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9

我针对antd3.x配置了如下

config.plugin('moment2dayjs').use('antd-dayjs-webpack-plugin', [
    {
      preset: 'antdv3'
    }
])

同时还设置了中文,如果不加上上面的preset,日期组件的中文会显示不出来

import 'dayjs/locale/zh-cn'

@iamkun
Copy link
Collaborator

iamkun commented Apr 26, 2020

可以提供一个复现的 repo 吗

@Kol96
Copy link
Author

Kol96 commented Apr 26, 2020

@iamkun
Copy link
Collaborator

iamkun commented Apr 26, 2020

经检查 是 dayjs@1.8.20 的 weekOfYear iamkun/dayjs#769 的更新导致了 antd 中计算周的异常 将会在下一个版本修复。

在此之前,请考虑使用 dayjs@1.8.19 版本

@Kol96
Copy link
Author

Kol96 commented Apr 26, 2020

好的,谢谢

@iamkun
Copy link
Collaborator

iamkun commented Apr 30, 2020

@Kol96 dayjs@1.8.26 已经修复这个问题

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

Successfully merging a pull request may close this issue.

2 participants