Skip to content

Conversation

hinzzx
Copy link
Contributor

@hinzzx hinzzx commented Oct 6, 2025

Previously we had a bug, where if we provide for example yyyy-MM as a value for the valueFormat property, in our ui5-date-picker component, the picker opened on the day view, instead of the month view as it was expected.

The reason behind this is that we had a fallback to "medium" format without checking if a valueFormat was provided.
So in short if a formatPattern property was missing (which is expected, as it is deprecated), we were using "medium" as a format. Therefore by default, we were opening to day view, as it is expected for the "medium" format.

Now, we correctly check the formats, and the ui5-date-picker is opening on the correct view.

Before and After

Before

2025-10-06_13-41-38 (1)

After

2025-10-06_13-57-11 (1)

Fixes: #12331

@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Oct 6, 2025

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 6, 2025 10:47 Inactive
@hinzzx hinzzx requested a review from GDamyanov October 6, 2025 11:44
Copy link
Contributor

@GDamyanov GDamyanov left a comment

Choose a reason for hiding this comment

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

LGTM

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview October 6, 2025 12:24 Inactive
Copy link
Contributor

@tsanislavgatev tsanislavgatev left a comment

Choose a reason for hiding this comment

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

Let's add a test

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.

[DatePicker]: [DatePicker opens in day view when using displayFormat/valueFormat for month-only usage (formatPattern deprecated)]
4 participants