With Blazor server, clicking the NOW button (obviously) sets the time to the time on the server since that's where the code is running. Is there a way to trap the NOW button click or somehow give it an offset or define the value that NOW means so NOW will mean the time that the user is sitting in?
---
ADMIN EDIT
One way this could land could be through templates for the header areas of the calendars - that would let you put your own NOW button there so you can handle its click and change the value as desired. So, you may want to follow and/or Vote for this approach here: https://feedback.telerik.com/blazor/1468855-header-template-for-the-calendars.
A workaround for the time being could be hiding the Now button with some CSS:
<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);
}
---