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] 希望日期区间选择器可以允许选择开始时间之前或结束时间之后的日期,在这种情况下通过调换顺序来修正选择结果 #3458

Closed
guxi11 opened this issue Jan 2, 2025 · 4 comments
Labels
easy easy level of difficulties 💪🏻 enhancement New feature or request IssueShoot to be published fixed, not be published

Comments

@guxi11
Copy link
Contributor

guxi11 commented Jan 2, 2025

这个功能解决了什么问题

问题表现:datapicker 在选择了开始/结束之后会限制开始之前/结束之后的日期置灰可不选择,目的是为了保证开始时间不可大于结束时间
(图1)。虽然它也是合理的,也是部分组件库的通用表现,但是不够人性化,会有些用户会因为这种现象感到困扰,不理解为什么不能选择那些灰色的日期。

其他组件库的方案:目前经过盘点,大部分大厂组件的使用指南中(字节、阿里、华为云、饿了么、teambition)提供了更好的解决方案——arco design / datapicker 允许用户选择所有的日期,在选择结束的时候,如果发现开始时间晚于结束时间,会进行一次对调调整(图2)。

需求:希望 tdesign 能提供 arco design 那样的表现的可选项。

image
image

你建议的方案是什么

在 daterangepicker 中提供一个可选项,允许用户选择开始时间之前的日期,或者结束时间之后的日期。

IssueShoot

  • 预估时长: 1
  • 期望完成时间: 2025-01-05 00:00:00 +0000 UTC
  • 开发难度: 低
  • 参与人数: 1
  • 验收标准: 实现期望改造效果,提 PR 并通过验收无误
  • 备注: 最终激励以实际提交 pull request 并合并为准
Copy link
Contributor

github-actions bot commented Jan 2, 2025

👋 @guxi11,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn
Copy link
Collaborator

uyarn commented Jan 2, 2025

@uyarn uyarn added 💪🏻 enhancement New feature or request easy easy level of difficulties IssueShoot labels Jan 2, 2025
@FliPPeDround
Copy link
Contributor

已认领

@uyarn
Copy link
Collaborator

uyarn commented Jan 10, 2025

supported 1.10.9

@uyarn uyarn closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy easy level of difficulties 💪🏻 enhancement New feature or request IssueShoot to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants