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

DatePicker 组件点击清除值后,时间界面变回英文 #3248

Closed
1 task
qiaozhi520 opened this issue Nov 23, 2020 · 7 comments
Closed
1 task

DatePicker 组件点击清除值后,时间界面变回英文 #3248

qiaozhi520 opened this issue Nov 23, 2020 · 7 comments
Labels
amazing 🤔 Need Reproduce We cannot reproduce your problem outdated

Comments

@qiaozhi520
Copy link

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

Version

1.6.3

Environment

生产环境

Reproduction link

https://www.antdv.com/components/date-picker-cn/

Steps to reproduce

使用datePicker 组件,allowClear=true,有value 值时,时间界面是中文,点击清除,时间界面变为英文,已全局配置 locale-provider,而且只有这个时间组件有问题,其他时间组件暂时没有发现这个问题

What is expected?

正确显示配置语言

What is actually happening?

没有正确显示

@John60676 John60676 added the 🤔 Need Reproduce We cannot reproduce your problem label Nov 23, 2020
@github-actions
Copy link

Hello @qiaozhi520. Please provide a online reproduction by forking this link or a minimal GitHub repository.Make sure to choose the correct version.

你好 @qiaozhi520, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

@qiaozhi520
Copy link
Author

Hello @qiaozhi520. Please provide a online reproduction by forking this link or a minimal GitHub repository.Make sure to choose the correct version.

你好 @qiaozhi520, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。

我发现这个bug产生的原因是 LocaleProvider 组件在router 组件 外造成的,我把LocaleProvider 组件放到router 组件里面后就可以了

@qiaozhi520
Copy link
Author

image
我错了,我改了后好了一瞬间,然后其他地方的时间组件都出现问题了,再改回来,发现没有任何作用,这个汉化有些看不太懂

@qiaozhi520
Copy link
Author

qiaozhi520 commented Nov 25, 2020

image

官方的文档也有这样的问题,有中文有英文

@xrkffgg
Copy link
Member

xrkffgg commented Nov 25, 2020

#2527 (comment)

@xrkffgg xrkffgg closed this as completed Nov 25, 2020
@qiaozhi520
Copy link
Author

最后找到原因是有其他引用的组件将moment 强制设置成了英文

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
amazing 🤔 Need Reproduce We cannot reproduce your problem outdated
Projects
None yet
Development

No branches or pull requests

4 participants