Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DatePicker throwing "Invalid JSON" Exception

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

limefrogyankcommented, Apr 29, 2021

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.

limefrogyankcommented, Apr 29, 2021

I’m taking a look now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found