fix(ui5-date-picker): open picker on correct view based on valueFormat/formatPattern #12436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously we had a bug, where if we provide for example
yyyy-MM
as a value for thevalueFormat
property, in ourui5-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 avalueFormat
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
After
Fixes: #12331