-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
fix: dateTime mode switch should trigger onCalendarChange #669
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #669 +/- ##
==========================================
- Coverage 99.05% 98.93% -0.12%
==========================================
Files 56 56
Lines 2431 2442 +11
Branches 735 741 +6
==========================================
+ Hits 2408 2416 +8
- Misses 21 24 +3
Partials 2 2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
看起来切换的时候应该触发一次 |
嗯嗯,目前在切换的时候会触发一次 |
close ant-design/ant-design#44280
问题出现原因:
在设置了 showTime 和 changeOnBlur 后,在没有点击确认按钮时点击输入框切换选择开始或结束日期时不会触发对应的 onChange 事件,因此 disabledDate 就失效了,导致最终可以选择出不符合 disabledDate 的时间范围。
解决思路:
去触发切换前输入框的
onCalendarChange
事件。ref:
ant-design/ant-design#24704
ant-design/ant-design#30467
ant-design/ant-design#31261