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

Range/DatePicker设置mode后,onChange失效 #15572

Closed
hk029 opened this issue Mar 21, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@hk029
Copy link

commented Mar 21, 2019

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

Reproduction link

https://codepen.io/voidsky/pen/moQbwO

Steps to reproduce

可以查看console,所有onChange里事件都没有触发,只能在onPanelChange里进行值的修改,这不符合这两个事件的预期。

What is expected?

onChange中能拿到改变的month

What is actually happening?

onChange并没有触发

Environment Info
antd 3.15.1
React 16.x
System MacOS 10.14.3
Browser Chrome 72.0.3626.121

同时,mode="month"的时候,弹窗无法关闭(这点已经有其他人反映了),但是目前没有可用的MonthRangePicker的组件,因此只能用RangePicker去模拟MonthRangePicker的功能

@afc163

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

mode="xxxx" 目前只是用于控制面板的展示方式,不会修改 RangePicker 的默认关闭逻辑。就像你说的,你现在需要用 RangePicker 去模拟 MonthRangePicker 的行为,目前可以用 openonOpenChange 去控制面板的显示,用 value 去同步当前日期展示。

其他类型的 XxxxPicker 可以关注跟踪 #4524 (comment)

@afc163

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.