TimePicker input errors aren't managed

Hello there,

I'm currently trying to add a DatePicker with only time showing :

I binded the value to my property, everything works fine, but there's a problem : there is no error management when the user types an incorrect time value (like an hour > 23, or minutes > 59) in the first display. It works perfectly fine on the deployed TimePicker, but it doesn't on the collapsed one (I don't know if I explain it clearly, please tell me if it's not understandable).

<RadzenDatePicker TValue="DateTime?" ShowTime="true" TimeOnly="true" DateFormat="HH:mm" Value="@SelectedDateTime" ValueChanged="async (args) => SelectedDateTime = (DateTime)args.Value" MinutesStep="5" />

When the value is incorrect, args.Value stays null, which means I can't use a personal method to check its value.

I'd like to have the main display managing bad input just like the expanded display does, or if it's not possible, I'd like to deactivate all keyboards inputs on this component.

Please tell me if there's anything I can do to fix that.

Thank you

Hi @simonDelpey,

Not sure if I understood you properly however if you enter invalid time in the main input the value will be cleared on lost focus.

Thank you for your answer,

The input does clear itself on the lost focus after entering an invalid value, but the method in the lambda expression ValueChanged="async (args) => SetSelectedDateTime((DateTime?)args.Value)" is never reached, since the parameter is null. Therefore, the app crashes before getting to the SetSelectedDateTime() method.