Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimePicker 'Min' and 'Max' don't work #3517

Closed
enisn opened this issue Mar 2, 2022 · 0 comments
Closed

TimePicker 'Min' and 'Max' don't work #3517

enisn opened this issue Mar 2, 2022 · 0 comments
Assignees
Labels
Type: Bug 🐞 Something isn't working
Projects

Comments

@enisn
Copy link

enisn commented Mar 2, 2022

Describe the bug
When I set Min or Max property, the TimePicker can't be initalized.

To Reproduce

<TimePicker TValue="TimeSpan" Max="TimeSpan.FromHours(6)" @bind-Time="@NewReservation.EndTime">

</TimePicker>
// ...
public TimeSpan EndTime { get; set; } = TimeSpan.FromHours(6);
// ...

And the exception is:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Input string was not in a correct format.
System.FormatException: Input string was not in a correct format.
   at System.Globalization.TimeSpanFormat.FormatCustomized(TimeSpan value, ReadOnlySpan`1 format, DateTimeFormatInfo dtfi, StringBuilder result)
   at System.Globalization.TimeSpanFormat.Format(TimeSpan value, String format, IFormatProvider formatProvider)
   at System.TimeSpan.ToString(String format)
   at Blazorise.TimePicker`1.<OnFirstAfterRenderAsync>d__2[[System.TimeSpan, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Blazorise.BaseComponent.OnAfterRenderAsync(Boolean firstRender)

Expected behavior
It should be initialized with 06:00 value and value shouldn't be greater than 06:00

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@enisn enisn added the Type: Bug 🐞 Something isn't working label Mar 2, 2022
@stsrki stsrki added this to 🔙 Backlog in Support via automation Mar 2, 2022
@stsrki stsrki added this to the 0.9.5 Support milestone Mar 2, 2022
@stsrki stsrki self-assigned this Mar 2, 2022
@stsrki stsrki closed this as completed Mar 2, 2022
Support automation moved this from 🔙 Backlog to ✔ Done Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working
Projects
Support
  
✔ Done
Development

No branches or pull requests

2 participants