Skip to content

Comments

feat(ui5-date-picker, ui5-daterange-picket, ui5-datetime-picker): introduce show-clear-icon property#13055

Open
GDamyanov wants to merge 11 commits intomainfrom
datepickes-clear-icon
Open

feat(ui5-date-picker, ui5-daterange-picket, ui5-datetime-picker): introduce show-clear-icon property#13055
GDamyanov wants to merge 11 commits intomainfrom
datepickes-clear-icon

Conversation

@GDamyanov
Copy link
Contributor

@GDamyanov GDamyanov commented Feb 10, 2026

Introduces a new show-clear-icon property to the DatePicker, DateRangePicker and DateTimePicker components that displays a clear icon inside the input field. When clicked, the icon clears the input value.

Changes:

  • Added boolean property (default: false, since: 2.20.0)
  • Clear icon automatically shows when there's a value and hides when empty, readonly, or disabled
  • Clicking the clear icon clears the value, focuses the input, and fires change events

@GDamyanov GDamyanov self-assigned this Feb 10, 2026
@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Feb 10, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 10, 2026 09:55 Inactive
@ilhan007
Copy link
Contributor

2.16 is 3-4 months old, next release is 2.20
Screenshot 2026-02-10 at 12 19 39

@GDamyanov GDamyanov requested a review from nnaydenow February 16, 2026 14:32
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 16, 2026 14:37 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 17, 2026 08:03 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 18, 2026 08:06 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 19, 2026 07:57 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 19, 2026 11:50 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 20, 2026 07:56 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview February 23, 2026 07:54 Inactive

_handleClearIconClick() {
this.value = "";
this._dateTimeInput.value = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the approach of giving the value trough the template. if we change the value it will rerender the component, so we can just set the value to the input value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants