How to customize TODAY button in datepicker component

1 Answer 1593 Views
Calendar DatePicker
n/a
Top achievements
Rank 1
n/a asked on 05 Oct 2022, 02:51 AM

Hi, Subject says it all.

 

Why not support this functionality?

 

I want to use server date when [TODAY] button is clicked,

 

 

 

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Konstantin Dikov
Telerik team
answered on 06 Oct 2022, 10:38 AM

Hello,

The Today's button does not allow customization, but there is a workaround that I could suggest. Within the "onChange" event of the DatePicker, you can see if the target element that triggered the change is the Today button and if so, add the custom date manually. Here is an example that I have made showing this approach:

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Calendar DatePicker
Asked by
n/a
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or