Datepicker am/pm up down

Small glitch with datepicker. When using the time portion and 12 hour clock, the first time you hit the up or down, it does nothing. You have to click them a second time for them to work.

that is the AM/PM portion to clarify.

I was not able to reproduce this
datepicker12h

I get that to work as well, it only happens when you bind to a property. In the instance I am working with I created a property called timeToday which has a value of DateTime.Now. When I use a datepicker set to timeonly 12 hour format hh:mm tt I get the issue. I have tested it in an empty page as well as a complex one. Same issue every time. If I don't bind it it works fine.

Which defeats the purpose of using it.

Here is the same bound:


datepicker12h

Ok, I see that your demo works fine. I created a form within Radzen Studio, I added a datepicker to it, set it to time only, bound it to a property (timeToday which is a DateTime.Now), gave it a format of hh:mm tt, turned on the ok button, set it to 12 hour format. When I run it, the AM/PM up down does not work on the first click.

Here is the generated code (not touched by me)

          <div class="align-items-center d-flex col-md-6" style="padding-bottom: 5px; padding-right: 5px">
            <RadzenDatePicker AllowClear="false" DateFormat="hh:mm tt" HourFormat="12" Placeholder="Time In" PopupRenderMode="PopupRenderMode.Initial" ShowTime="true" ShowTimeOkButton="true" style="width: 100%" TimeOnly="true" @bind-Value="@timeToday" Name="Datepicker2" class="my-timeonly-datepicker">
            </RadzenDatePicker>
          </div>

Please use Radzen Studio to create a page and set up the control this way and see if it works for you.

Thanks for the help.

the class only changes the datepicker icon to a clock. If I remove it, I get the same behavior as before.

Radzen will just generate the code - it does not matter if the component is setup using Radzen or manually. What version of Radzen.Blazor is referenced in your project? Your markup also worked normally on my end:


datepicker12h

Any additional info? Different culture in your application?

I am on the latest update of Radzen. I also created a test application with nothing more than a page with a datepicker on it. In the test application I used the standard theme. I do not know why this is happening. I can make the am/pm work as long as I don't bind a value.

Can you possibly try to duplicate it the way that I am without using your demo? Just create a test application, with one page with only a datepicker on it? Set the datepicker the way I have discussed and see if it works for you?

I've tested using your instruction and here is the result:

datepicker12h

I've retested also your report from July and I was not able to reproduce the wrong behavior reported at that time.

Here is the application:

Ok...uninstalled and re-installed Radzen and now works fine!