Skip to content

Conversation

hinzzx
Copy link
Contributor

@hinzzx hinzzx commented Aug 27, 2025

Previously our in ui5-datetime-picker when a user enters an invalid value (e.g., "invalid text") and then selects a new date from the calendar, the time portion was being reset to 12:00:00 AM instead of preserving the previously valid time.

The reason behind that is that the component was not storing the last valid time value.
So, when a new date was selected, the component had no reference to the previously valid time, so it defaulted to midnight (12:00:00 AM).

We now store the valid value and fallback to it whenever needed. And if no value was provided, the default behaviour is preserved (auto selects the current time)

Fixes: #11376

@hinzzx hinzzx marked this pull request as ready for review August 27, 2025 11:37
@hinzzx hinzzx requested a review from GDamyanov August 27, 2025 11:39
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

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.

[ui5-datetime-picker]: restore wrong value
2 participants