Date control shows two dates

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

Hi @sharpeye,

The second day marks today's date. It is not selected - just visually highlighted.

I get that, but what if I don't want the current date highlighted? it's confusing to the end user in my opinion.

Most (all?) datepickers highlight the current date in some way. Not sure why you think it is confusing. A few examples:

  1. Datepicker from the Material design specification: Date pickers – Material Design 3
  2. Windows
  3. The browser built-in <input type="date">