Skip to content

fix(ui5-date-range-picker): remove relative date handling#13365

Merged
hinzzx merged 14 commits intomainfrom
drp-rel-dates-removal
Apr 27, 2026
Merged

fix(ui5-date-range-picker): remove relative date handling#13365
hinzzx merged 14 commits intomainfrom
drp-rel-dates-removal

Conversation

@hinzzx
Copy link
Copy Markdown
Contributor

@hinzzx hinzzx commented Apr 3, 2026

Overview

Currently our ui5-daterange-picker resolves relative dates like "today" and "tomorrow" to concrete dates. The sap.m.DateRangeSelection does not. It sets an error state instead, meaning that both project handles same scenarios in different ways causing inconsistencies.

So in order to fix this we:

  • Added roundtrip check to detect relative date strings in DateRangePicker
  • Modified isValid(), isValidValue(), isValidDisplayValue() to reject them

What This Fixes

  • Relative dates ("today", "tomorrow", etc.) now set valueState="Negative" instead of resolving
  • Behavior aligns with sap.m.DateRangeSelection
  • DatePicker continues resolving relative dates as before

@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Apr 3, 2026

🧹 Preview deployment cleaned up: https://pr-13365--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 3, 2026 14:34 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 6, 2026 06:49 Inactive
@GDamyanov GDamyanov self-requested a review April 6, 2026 12:42
Comment thread packages/main/cypress/specs/DateRangePicker.cy.tsx Outdated
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 7, 2026 08:07 Inactive
@GDamyanov GDamyanov requested review from GDamyanov and Stoev April 7, 2026 10:53
Comment thread packages/main/cypress/specs/DateRangePicker.cy.tsx Outdated
Comment thread packages/main/src/DateRangePicker.ts Outdated
hinzzx and others added 3 commits April 8, 2026 09:04
Co-authored-by: Dimitar Stoev <dimitar.stoev@sap.com>
Co-authored-by: Dimitar Stoev <dimitar.stoev@sap.com>
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 8, 2026 06:13 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 12, 2026 09:43 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 12, 2026 11:39 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 15, 2026 08:31 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 16, 2026 07:08 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 17, 2026 07:10 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 22, 2026 05:52 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 27, 2026 08:28 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 27, 2026 10:34 Inactive
@hinzzx hinzzx merged commit 5694559 into main Apr 27, 2026
13 checks passed
@hinzzx hinzzx deleted the drp-rel-dates-removal branch April 27, 2026 12:51
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 27, 2026 12:51 Inactive
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version v2.22.0-rc.3 🎉

The release is available on v2.22.0-rc.3

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants