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] insetInput add clear icon #1638

Closed
shijiatongxue opened this issue Jun 1, 2023 · 1 comment
Closed

[DatePicker] insetInput add clear icon #1638

shijiatongxue opened this issue Jun 1, 2023 · 1 comment
Labels
feature request Request new feature

Comments

@shijiatongxue
Copy link
Collaborator

Which Component Need Enhancement 期望新增功能的组件

  • DatePicker

What does the proposed API look like 期望支持的API

showClear

Feature Description 功能描述

insetInput 加个清除按钮,方便清除掉选择的日期

JWQXt70qrp

Additional information 补充说明

@shijiatongxue
Copy link
Collaborator Author

shijiatongxue commented Jun 2, 2023

为什么在禁用的输入框上加一个清除按钮?

这是一个对 UI 的妥协。在保证内嵌输入框焦点不乱的情况下,我们禁用了 trigger。但是这时很难快速清除内嵌输入框的内容,特别是在 type=dateTimeRange 时。

image

这时我们需要加一个清除按钮,按钮的位置有两个。内嵌输入框或者 tirgger 上。

内嵌输入框的问题:

  1. 加清除按钮会有一点语义不清晰,特别是输入框有 4 个时,不太知道清除的是哪个输入框;
  2. 内嵌输入框上位置有点不够用,很难再放一个清除按钮上去。

退而求其次,我们选择了在 trigger 输入框上加这个清除按钮。

shijiatongxue added a commit that referenced this issue Jun 5, 2023
Co-authored-by: shijia.me <shijia.me@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new feature
Projects
None yet
Development

No branches or pull requests

1 participant