Problem with RadzenDatePicker, setting midnight causes visual bug

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.

timeonly_init_8

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.

null_2

Am I doing something wrong here? I would love to see some advice to fix my problem. Thanks

I can put only 2 gifs on the post, so I will put the third one in a comment. It is related to problem #2.

Null_1

Thanks for your report @phonenamone! I was able to reproduce and fix the problem - the fix will be released before the end of the week!

Here is the behavior after my fix:
dp-to

1 Like

Thanks for a quick response!