-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add DateOnly and TimeOnly support to model binding & routing #34591
Comments
Thanks for contacting us. We're moving this issue to the |
I want to mention that the TryParse heuristic that we added in minimal API means we support these out of the box 😄 |
Hmm, your comment reminded me that we want to special case DateTime. The default |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Is this the reason I get the following error when returning
|
Seems that's from the underlying serializer in |
@srajkovic Here's a workaround if you're interested: https://kevsoft.net/2021/05/22/formatting-dateonly-types-as-iso-8601-in-asp-net-core-responses.html (NuGet) @DamianEdwards |
@maxkoshevoi, I think you meant to tag @srpeirce. DateOnly and TimeOnly look great though! |
@rafikiassumani-msft some of this work will be an ask from your team for .NET 7. |
Are you going to review change detection for component parameters too in https://github.com/dotnet/aspnetcore/blob/main/src/Components/Components/src/ChangeDetection.cs#L37? Suggested change as below.
|
At this point we don't believe this will make it into .NET 7. Moving to .NET 8. |
Is there anyone who is still blocked by this? It seems that these types should work following the addition of the |
Seems like everything except using TimeOnly as a dictionary key (fix is already merged for .NET 8) is working out of the box in .NET 7 |
Closing this issue since it's been a month and it appears that DateOnly and TimeOnly already work in .NET 7 with the addition of the TryParseModelBinder |
The text was updated successfully, but these errors were encountered: