DatePicker throwing "Invalid JSON" Exception
See original GitHub issueI have two DatePickers
bound to two distinct DateTime?
objects that are not null. When I click on a picker right after having clicked the other, I get the following exception:
Unhandled Exception:
blazor.webassembly.js:1 System.Text.Json.JsonException: Invalid JSON
blazor.webassembly.js:1 at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeJS(JSRuntime jsRuntime, String arguments)
blazor.webassembly.js:1 at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.EndInvokeJS(String argsJson)
Here’s a link to a video of the issue in action:
Here’s the code:
<DatePicker Label="Photograph Date:" Placeholder="Pick the exact photograph date..." AllowTextInput=@false @bind-Value=@Specifics.PhotographDate />
<DatePicker Label="Sample Date:" Placeholder="Pick the exact sample date..." AllowTextInput=@false @bind-Value=@Specifics.SampleDate />
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
React datepicker throwing invalid time value
It looks like selected prop of DatePicker accepts instance of Date and not an ISO string. Try converting your date string to date...
Read more >DatePicker Throws Uncaught Invalid date Error
The Date Picker on the events listing page is throwing a Uncaught Invalid date Error when I select any date, I'm seeing this...
Read more >RangeError: invalid date - JavaScript - MDN Web Docs
The JavaScript exception "invalid date" occurs when a string leading to an invalid date has been provided to Date or Date.parse().
Read more >Angular Material Date Picker Invalid Date Validation
It means that when you give any invalid input like number or string then it will capture in the new Date(inputValue) object by...
Read more >Strict mode in React Datepicker component
Here, it allows to enter the valid or invalid value in textbox. If you are entering out-of-range or invalid date value, then the...
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 FreeTop 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
Top GitHub Comments
I think my PR fixes the breaking error, but it’s now highlighting another flaw where the callout that was originally dismissed reopens. It’s not as bad as before, but something we still to fix.
I’m taking a look now.