jdtcn / BlazorDateRangePicker

A Blazor component for choosing date ranges and dates
MIT License
186 stars 34 forks source link

TimePicker24Hour has wrong value and HoursRange is not refreshed if culture changes #90

Closed marcOcram closed 10 months ago

marcOcram commented 1 year ago

Hello,

after using the fixes of #89 for a while for dates only, I now have the requirement to use the time picker, too.

89 introduced a bug where TimePicker24Hour has the wrong value read from the current culture because

https://github.com/jdtcn/BlazorDateRangePicker/blob/96315f5f1c942bdf99610e05c16ca579d6138e09/BlazorDateRangePicker/DateRangePicker.razor.cs#L450 and https://github.com/jdtcn/BlazorDateRangePicker/blob/96315f5f1c942bdf99610e05c16ca579d6138e09/BlazorDateRangePicker/DateRangePicker.razor.cs#L514 should be negated.

DateTimeRangePicker

Another issue is that the property HourRange is not updated on change of culture

https://github.com/jdtcn/BlazorDateRangePicker/blob/96315f5f1c942bdf99610e05c16ca579d6138e09/BlazorDateRangePicker/TimePicker.razor.cs#L43

You can see that in the image the hour list is always 24 hours

jdtcn commented 1 year ago

Hi, thanks for this bug report, I fixed it in version 4.5.0