Hello, I have 2 problems with the RadzenDatePicker component.
Problem 1 - @bind-variable inisialised is not null
I defined my component like this://Page with datepicker
<RadzenDatePicker @bind-Value="@Record.HoursFrom" ShowTime="true" TimeOnly="true" DateFormat="HH:mm" Name="HoursFrom" />
When the Record.HoursFrom variable is initialised as:
//Base class
public TimeOnly? HoursFrom { get; set; } = new TimeOnly(8, 0);
My datepicker acts strange. I cannot set 0 hours nor 0 minutes by clicking the asc/desc arrows. I can write 0 using the keyboard an it will be saved to the database. The problem is the inabillity to choose 0 by these arrows.
Problem 2 - @bind-value is initialised, but it's null
I looked at the documentation (Blazor DatePicker Component | Free UI Components by Radzen) and I can't see a fundamental difference between my code and yours (other than leaving the Record.HoursFrom being null, for the purpose of showing my problem).
datepicker is defined like this:
//Page with datepicker
<RadzenDatePicker @bind-Value="@Record.HoursFrom" ShowTime="true" TimeOnly="true" DateFormat="HH:mm" Name="HoursFrom" />
Record.HoursFrom
//Base class
public TimeOnly? HoursFrom { get; set; }
And I can choose 0, but after saving it to the DB, when I look up the record again, the DatePicker does not show any hours, it's blank. Altough the value in the db is alright.
Am I doing something wrong here? I would love to see some advice to fix my problem. Thanks