Summary
Clearing the date-time in a RadzenDatePicker fails to clear the time component. The old time lingers and recurs when a brand-new date is selected.
Impact
This can lead to a user inadvertently selecting a time they had intended to clear.
We have an application that manages dispatch operations. In our application, the following two inputs are distinct, and this bug makes it easy to stumble into case (2) after the user intentionally cleared the input but then reselected a new date:
- Date without any specific time (time cleared).
- Date with a specific time.
If the user fails to notice the lingering time, they will submit the form without realizing it.
Steps to Reproduce
- Bind a RadzenDatePicker to a nullable
DateTime?withShowTime="true". - Select a date with a specific time (e.g., 5 AM).
- Clear the date-time (use the X with
AllowClearor delete the text) and tab away.- Observe the bound
DateTime?value is set to null, as expected.
- Observe the bound
- Reopen the date picker.
- Observe the date appears as today by default and the time is zero, as expected.
- Select any date.
- Bug: Observe the old time (e.g., 5 AM) now reappears. Expected: The time should remain zero because we previously cleared the entire date-time.
Scope
This bug applies regardless if the picker is cleared using the X button with AllowClear, or by deleting the entire text, which also clears the control.
Version
Reproducible in the latest package version 11.2.3 on a Blazor Server application targeting .NET 10.
This bug was previously reported in 2023: