DateTime Picker question

I am testing your datetime picker from example page using the code below

<RadzenDatePicker ShowTime="true" @bind-Value="currentDateTime" HourFormat="12" DateFormat="MM/dd/yyyy h:mm tt" />

This seems to produce what I want but I have a question regarding the AM/PM selection functionality.

If I toggle AM/PM then the date moves forward/back 1 day. I would expect just the time to change to either AM or PM and not the date to be affected. I also found that the hour/minute containers move ever so slightly when clicking those buttons. This can be seen in your DateTime picker demo ' DatePicker with 12 hour time format' and lastly, can the minutes be formatted as '01' and not just '1'

Another observation, even though I have a 2 way databind to that currentDateTIme / @currentDateTIme property, it doesn't get updated.

I'm currently using the following to achieve the same result as @bind-Value

<RadzenDatePicker ShowTime="true" @bind-Value="@startingDateTime" HourFormat="12" DateFormat="dd/MM/yyyy hh:mm tt" Change="@(args =>{startingDateTime = args;})"/>

and lastly, would it be possible to have a 'Tick' box added at the bottom next to the Time selection to complete the selection and close down the dropdown component instead of just clicking away from the component?

We will address your findings with the next update. There are too many breaking changes with latest .NET Core 3.0 Preview9 and once we finish we will continue with our fixes.

1 Like

Radzen.Blazor 0.0.70 just released. The DatePicker popup will be closed now when you choose the day and changing AM/PM will not move the day. Not sure about the value binding - the value of one of the pickers in our demo (DatePicker with 12 hour time format) is bound and updated properly:

We added also Ok button to time part of the picker - it will be published later today:

Thanks, there is still a bit of functionality that isn't working 100%, if you edit the date time fields directly without the drop-down then they will either be removed completely or not change correctly. Here I'm trying to change the time to 6:20 PM

Yep, the date is parsed on the Blazor side however we will do our best to provide JavaScript only date input: DatePicker UI lacks input validation