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 onOk callback无效 #2399

Closed
miaojiuchen opened this issue Jul 15, 2016 · 3 comments
Closed

DatePicker onOk callback无效 #2399

miaojiuchen opened this issue Jul 15, 2016 · 3 comments

Comments

@miaojiuchen
Copy link
Contributor

本地环境

Node v5.3.0

  • antd 版本: V1.6.4
  • 操作系统及其版本:Windows 10 Build 10586
  • 浏览器及其版本: Chrome 最新

你做了什么?

DatePicker showTime 情况下 onOk 回调无效

你期待的结果是:

文档无相关demo

实际上的结果:

onOk 回调无效

可重现的在线演示

http://codepen.io/infinitymiaojiuchen/pen/ZOvXRd?editors=001

afc163 added a commit that referenced this issue Jul 15, 2016
onChange should be triggered at clicking ok button
when showTime is true. You can use onChange replace onOk
anytime.

This commit revert a05b4e6, which break the behavious above.

close #2399, also fix #2120
@afc163
Copy link
Member

afc163 commented Jul 15, 2016

a05b4e6

把逻辑改坏了。正确的逻辑如下:

需要显示时间时,点击面板上的日期,不触发 onChange,点击 ok 时触发 onChange。

直接使用 onChange 就好。

@afc163 afc163 closed this as completed Jul 15, 2016
@miaojiuchen
Copy link
Contributor Author

THX!

@lock
Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants