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

希望日历组件增加在呼出的年月下拉菜单中选择完月后自动关闭该下拉菜单的功能 #6576

Open
3 tasks done
Tracked by #6736 ...
iceniler opened this issue Nov 28, 2024 · 0 comments · May be fixed by #6741
Open
3 tasks done
Tracked by #6736 ...
Labels
feature request New feature or request

Comments

@iceniler
Copy link

iceniler commented Nov 28, 2024

问题的清晰而简明的描述

作为使用 Naive UI 的开发者,我希望日历组件可以提供一个年月下拉菜单在点击选择完月份后可以自动关闭该年月下拉菜单的选项,以便用户可以按其使用时预期的方法使用。

建议的解决方案

在模块DatePicker中,我们可以提供一个新的props配置项:chooseMonthAtLast:boolean = false
当该选项为true时,用户点击了月份就自动收回年月下拉菜单

备选方案

备选可以考虑放开年月下拉菜单的控制权和事件,这样如果我们需要在选月时就关闭,可以监听事件并关闭下拉菜单

附加上下文

据我的大量用户反馈,她们认为在这个下拉菜单中选择时肯定是会先选年份再选月份的,所以当选完月份时这个下拉菜单可以自动关闭。我认为这个功能甚至可以是默认的。

验证

  • 阅读 贡献指南
  • 阅读 文档
  • 检查是否已经存在请求相同功能的问题,以避免创建重复的问题。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment