4 Answers, 1 is accepted
Hello Doug,
I made the following feature request for your to Follow: https://feedback.telerik.com/blazor/1496094-time-zone-for-now-button. At the moment, I don't think I can offer a feasible solution (apart from maybe hiding that button with CSS if it's an issue for you). The NOW button will trigger the ValueChanged event an then OnChange, but those can be triggered by the user typing or selecting things, and those scenarios are quite different - when they type/choose from the spinners you can apply the offset you know they have (say, because they have set a time zone in their accounts).
Regards,
Marin Bratanov
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/.
Hi Marin,
I've had to revisit this issue. We've decided that it would be an acceptable solution to remove the NOW button from the datetime picker as you suggest. I'm not an expert with CSS (especially when it comes to applying it to Telerik controls) so would you mind providing me the CSS to hide the NOW button? Thanks.
Hi Doug,
This blog post can help you create such CSS overrides yourself. Here is also an example I made for you:
<style>
.no-now-button .k-time-now {
display: none;
}
</style>
Selected time: @selectedTime
<br />
<TelerikDateTimePicker PopupClass="no-now-button"
Min="@Min" Max="@Max" @bind-Value="@selectedTime"
Format="dd MMM yyyy HH:mm:ss" Width="250px"></TelerikDateTimePicker>
@code {
private DateTime? selectedTime = DateTime.Now;
public DateTime Min = new DateTime(1990, 1, 1, 8, 15, 0);
public DateTime Max = new DateTime(2025, 1, 1, 19, 30, 45);
}
Regards,
Marin Bratanov
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/.
Marin,
That works perfectly! Thanks for the quick response!