Declined
Last Updated: 03 Mar 2025 17:28 by Tech
Tech
Created on: 26 Feb 2025 18:08
Category: DatePicker
Type: Feature Request
0
Add a parameter to hide the "Today" button

In our application "Today" is NEVER a valid selection.  But there is no way to turn it off.

Yes, we realize that we can create our own header template.  But then we have to reproduce the next/previous functionality, for every single instance of the component -- and we have many dozens of them.

 

 

 

2 comments
Tech
Posted on: 03 Mar 2025 17:28
That works, thank you!!
ADMIN
Hristian Stefanov
Posted on: 03 Mar 2025 14:23

Hello,

I can confirm that the desired result can already be easily achieved with a single line of CSS. Here's an example I've prepared for you:

<style>
    .k-calendar-nav-today {
        display: none;
    }
</style>

<TelerikDatePicker @bind-Value="DatePickerValue"
                   Format="dd MMMM yyyy"
                   Min="@MinDate"
                   Max="@MaxDate"
                   Width="200px">
</TelerikDatePicker>

@code {
    private DateTime DatePickerValue { get; set; } = DateTime.Today;
    private DateTime MinDate = DateTime.Today.AddMonths(-1);
    private DateTime MaxDate = DateTime.Today.AddMonths(1);
}

Regards,
Hristian Stefanov
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!