-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
I am getting the following error
Severity Code Description Project File Line Suppression State
Error (active) CS1503 Argument 1: cannot convert from 'System.TimeSpan' to 'System.DateTime' XXXXXV6New.Client
I am storing Just the Time (like 9:00 AM") to indicate start time and stop time in Time(7) field of Azure SQL DB.
Dbcontext generates that field as
public TimeSpan StartTime { get; set; }
I am trying to bind this to input element
<input type="time" class="form-control time-control" @bind:event="oninput"
@bind="@_OrgLocation.StartTime" />
which is resulting into above mentioned error.
How do i resolve this issue ?
The idea is to store start and Stop time in database(just the Time part with AM/PM) like 9:00 am to 5:00 PM
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components