-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one
Milestone
Description
Background and Motivation
This is an extension of #34115 to support DateOnly
and TimeOnly
, given we already support DateTime
.
Proposed API
namespace Microsoft.AspNetCore.Components
{
public static class NavigationManagerExtensions
{
+ public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly value)
+ public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly? value)
+ public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly value)
+ public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly? value)
}
}
Usage Examples
[Parameter, SupplyParameterFromQuery]
public DateOnly OnlyTheDate { get; set; }
[Parameter, SupplyParameterFromQuery]
public TimeOnly OnlyTheTime { get; set; }
Alternative Designs
N/A, extension of existing API.
Risks
Concept count / complexity. Other than that, it's a fairly straightforward change that a user has requested already.
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one