LocalStorage icon indicating copy to clipboard operation
LocalStorage copied to clipboard

[Bug] DateOnly not supported on set/get

Open thepra opened this issue 3 years ago • 2 comments

Describe the bug Today I was trying to use DateOnly in my form and save the filter so it's available after reload but it does seem that the SetItemAsync breaks silently and the filter model isn't saved in the localStorage

To Reproduce Steps to reproduce the behavior:

  1. Setup a class with a filter property of type DateOnly
  2. Invoke on ValueChanged the SetItemAsync trying to save the whole filter model
  3. Do a GetItemAsync or just look in the localStorage to find no record of the filter

Expected behavior DateOnly working in get and set

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

Hosting Model (is this issue happening with a certain hosting model?):

  • Blazor Hosted WebAssembly

thepra avatar May 15 '22 14:05 thepra

Hi @thepra

Could you provide a link to a repro project? I don't quite understand what you're trying to do from your reproduction steps.

chrissainty avatar Aug 27 '22 22:08 chrissainty

@thepra It looks like this is a feature missing in System.Text.Json (https://github.com/dotnet/runtime/pull/69160) and it will be fixed in .NET 7

chrissainty avatar Sep 17 '22 15:09 chrissainty

Closing as this appears to be resolved in .NET 7

chrissainty avatar Jun 06 '23 21:06 chrissainty