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

rangepicker 建议参考 airbnb datepicker 交互 #25120

Closed
1 task
hellosean1025 opened this issue Jun 19, 2020 · 6 comments
Closed
1 task

rangepicker 建议参考 airbnb datepicker 交互 #25120

hellosean1025 opened this issue Jun 19, 2020 · 6 comments
Assignees
Labels
improvement improve some features

Comments

@hellosean1025
Copy link

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

What problem does this feature solve?

升级了 ant4 后,rangepicker 在已选时间的情况下,每次选择会关闭筛选框

What does the proposed API look like?

可参考: http://airbnb.io/react-dates/?path=/story/daterangepicker-drp--default
期望点两次才会关闭

@afc163
Copy link
Member

afc163 commented Jun 19, 2020

react-dates 在两个都有值的情况下:

  1. 选结束时间直接关闭浮层,完成选择。
  2. 选开始时间会保持浮层,需要再点结束时间,这样和初始选择的习惯保持一致。

我们也可以按这个来优化,正好也能解决一部分目前业务上遇到的旧版交互习惯的反馈。@zombieJ

@afc163 afc163 added the improvement improve some features label Jun 19, 2020
@zombieJ
Copy link
Member

zombieJ commented Jun 19, 2020

嗯,点开始后选择点击外面关闭。可以

@zombieJ zombieJ self-assigned this Jun 19, 2020
@xrkffgg
Copy link
Member

xrkffgg commented Jun 19, 2020

#24750

@hellosean1025
Copy link
Author

@zombieJ 这个交互的改进大概什么时间能支持?

@hellosean1025
Copy link
Author

hellosean1025 commented Jun 20, 2020

优化了重新选择时间每次选择都会关闭弹框:
示例:https://codesandbox.io/s/intelligent-mendel-pk2n4?file=/index.js

原理:修改了 rc-picker 部分逻辑
https://github.com/hellosean1025/picker

@afc163
Copy link
Member

afc163 commented Jun 24, 2020

fixed in react-component/picker#89 and #25135

@afc163 afc163 closed this as completed Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement improve some features
Projects
None yet
Development

No branches or pull requests

4 participants