ShowClearButton for TelerikDatePicker and TelerikTimePicker

1 Answer 20 Views
DatePicker TimePicker
Ivaylo
Top achievements
Rank 1
Ivaylo asked on 12 Aug 2025, 03:20 PM

Hello,

I noticed that when TelerikDatePicker and TelerikTimePicker components are used with nullable DateOnly and nullable TimeOnly values, respectively, and ShowClearButton is set to true, the "X" button still appears in an empty field when the value is null. This shouldn’t happen, as there is no value to clear. When you click on the field to type a date or time, the "X" button disappears.

Here is the reproduction of the issue:

https://blazorrepl.telerik.com/GfaCbmlz03hT2mky54

It doesn’t seem like this is intended behavior. If it’s not, is there a workaround to prevent the "X" from appearing when there is no value?

Thanks,

Ivaylo

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 15 Aug 2025, 12:44 PM

Hi Ivaylo,

The clear button should disappear, when there is no value in the DatePicker. I've logged this for fixing on your behalf: https://feedback.telerik.com/blazor/1696244-the-datepicker-and-the-rest-of-the-pickers-does-not-hide-its-clear-button-when-the-value-is-null 

For the time being, you may use the workaround shown here: https://blazorrepl.telerik.com/wpaiFzFc26Zot90s18 

It involves JavaScript interop to hide the clear button, when there is no value initially, or when the user clears the current value. 

I've updated your Telerik points for reporting this issue. 

Regards,
Ivan Danchev
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
DatePicker TimePicker
Asked by
Ivaylo
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or