In my blazor page that is hosted on azure, i am trying to set pacific date as today date.
<RadzenDatePicker @bind-Value="fromDate" Placeholder="From Date" DateFormat="MM-dd-yyyy" />
protected override async Task OnInitializedAsync()
{
TimeZoneInfo pacificZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
DateTime pacificNow = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, pacificZone);
fromDate = pacificNow;
}
It ends up like this: I want only Nov 1 (pacific date) and not Nov 2 to be also selected (UTC date)
1 Like
korchev
2
Hi @sharpeye,
The second day marks today's date. It is not selected - just visually highlighted.
Chad
3
I get that, but what if I don't want the current date highlighted? it's confusing to the end user in my opinion.
korchev
4
Most (all?) datepickers highlight the current date in some way. Not sure why you think it is confusing. A few examples:
- Datepicker from the Material design specification: Date pickers – Material Design 3
- Windows
- The browser built-in
<input type="date">