When the TelerikTimePicker is cleared, the input is marked as invalid, even if the backing variable isn't required

1 Answer 30 Views
TimePicker
Andrew
Top achievements
Rank 1
Andrew asked on 05 May 2025, 06:02 PM

I have a TelerikTimePicker component and I have set the ShowClearButton="true". The Value property of the component is bound to a nullable DateTime variable (e.g., DateTime? MyTime). If I first input/select a valid time and then clear the value (using the "x" button in the input field), the component is highlighted in red because the .k-invalid class has been added to the HTML markup. However, the value in the TelerikTimePicker is not actually invalid because a null value is allowed.

This is very similar to this issue for the TelerikDateTimePicker: https://feedback.telerik.com/blazor/1660917-datetimepicker-should-not-get-red-border-when-bound-to-nullable-datetime-and-the-input-is-empty

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 May 2025, 09:56 AM

Hi Andrew,

Yes, the issue is the same, and the suggested workaround is the same. I hope it's not too much work to apply it everywhere where needed.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
TimePicker
Asked by
Andrew
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or