Blazor InputDate Error in FireFox
See original GitHub issueI use an InputDate control as:
<div class="form-group">
<label for="@("Birthdate" + usr.UsrId.ToString())">@L["lblBirhdate"]</label>
<InputDate @bind-Value=usr.PusrBirhdate class="form-control" id="@("Birthdate" + usr.UsrId.ToString())" @onkeypress="OnDateKeyPress" required/>
<ValidationMessage For="() => usr.PusrBirhdate" @Required="true" />
</div>
Describe the bug
A clear and concise description of what the bug is.
When I press the number: 0 in any date fields, it try to validate the date as in this example, the mouth as: 00
I get as soon as the keypress is done, an unhandled error exception as
System.InvalidOperationException: InvalidCharacterError: String contains an invalid character
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
To Reproduce
Insert an InputDate in a Blazor page, Open it in a Firefox browser.
<InputDate class="form-control" id="Birthdate" required/>
Run it, insert a 00 for the month by typing only 0
Exceptions (if any)
System.InvalidOperationException: InvalidCharacterError: String contains an invalid character at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
Further technical details
- ASP.NET Core version 3.1.3
- The IDE (VS / VS Code/ VS4Mac) you’re running on, and it’s version : VS 2019 Version 16.7.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Inputdate doesn't work on internet explorer 11 (blazor)
hi everyone I am using blazor and i noticed that inputdate does not open the datapicker on ie, is there any way to...
Read more >ASP.NET Core Blazor forms and input components
The Blazor framework supports forms and provides built-in input ... InputDate<TValue> and InputNumber<TValue> support error message ...
Read more >Blazor RZ10001 The type of component 'InputDate' cannot ...
Error RZ10001 The type of component 'InputDate' cannot be inferred based on the values provided. Consider specifying the type arguments directly ...
Read more ><input type="month"> - HTML: HyperText Markup Language
<input> elements of type month create input fields that let the user enter a month and year allowing a month and year to...
Read more >KeyNotFoundException in DatePicker and DateTimePicker ...
Just create a Blazor WASM Client project. Add the DatePicker. Publish with AOT and run in Firefox. Current culture is set to german....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Glad you tracked down the issue! Closing this now.
Finally, I found the problem, it was the damned @Required=“true” who fail with the FluentValidation… You can close it…