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日期面板和显示时间不一致 #15278

Closed
1 task
simonyouth opened this issue Mar 8, 2019 · 5 comments
Closed
1 task

DatePicker日期面板和显示时间不一致 #15278

simonyouth opened this issue Mar 8, 2019 · 5 comments
Assignees
Labels
3.x 3.x stable issue or bug fix, PR should be cherry-pick to master 🐛 Bug Ant Design Team had proved that this is a bug. Inactive

Comments

@simonyouth
Copy link

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

Reproduction link

https://ant-design.gitee.io/components/date-picker-cn/

Steps to reproduce

  • DatePicker的value和defaultValue都为state传入,日期改变setState改变value
  • 当用户点击了很久之前的日期,这种操作不被允许,但不能禁止,给出warn message,同时不会setState改变value
  • 再次打开日期面板选择日期,时间会focus在上次选择的日期,和value不一致

What is expected?

面板日期和显示一致

What is actually happening?

不一致

Environment Info
antd 3.8.4
React 16.4.1
System window 10专业版
Browser chorme Version 72.0.3626.119 (Official Build) (64-bit)
@afc163
Copy link
Member

afc163 commented Mar 8, 2019

关闭后应该清空掉面板里的 state。

@zombieJ

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Mar 8, 2019
@simonyouth
Copy link
Author

空掉面板里的 state。
面版没有state啊,传的是value,清除了还怎么显示呢

@afc163
Copy link
Member

afc163 commented Mar 9, 2019

@simonyouth 我是在和 @zombieJ 讨论可选的 fix 方案。

@simonyouth
Copy link
Author

simonyouth commented Mar 9, 2019

不能让面板的state和传入的value一致吗
open面板的时候检查传入的value

@zombieJ zombieJ added the 3.x 3.x stable issue or bug fix, PR should be cherry-pick to master label Sep 24, 2020
@github-actions
Copy link
Contributor

Hi @simonyouth,
Current branch is off the maintenance period. We may not accept pull request or fix bug with it anymore. This topic will be auto closed.

你好 @simonyouth,
当前分支已经过了维护期。我们不会再接受对其的相关 PR 与 issue。当前 topic 会被自动关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x 3.x stable issue or bug fix, PR should be cherry-pick to master 🐛 Bug Ant Design Team had proved that this is a bug. Inactive
Projects
None yet
Development

No branches or pull requests

4 participants