Package Syncfusion.Blazor 18.1.0.53
Target Framework netcoreapp.3.1
CS1503 Argument 2: cannot convert from 'Microsoft.AspNetCore.Components.EventCallback<System.DateTime>' to 'Microsoft.AspNetCore.Components.EventCallback' SHIMSWebPortal E:\Blazor Server 01\SHIMSWebPortal\SHIMSWebPortal\obj\Debug\netcoreapp3.1\Razor\Pages\_Timecards\Add.razor.g.cs 370 Active
CS1503 Argument 2: cannot convert from 'Microsoft.AspNetCore.Components.EventCallback<System.DateTime>' to 'Microsoft.AspNetCore.Components.EventCallback' SHIMSWebPortal E:\Blazor Server 01\SHIMSWebPortal\SHIMSWebPortal\Pages\_Timecards\Add.razor 1 Active
I am trying to implement the ChangeValue handler and getting those 2 errors above. My code in my Razor Component is: by the way just learning web programming. Been programming for windows desktop apps.
<tr>
<td>
<SfDateTimePicker TValue="DateTime?" TimeFormat="HH:mm" Step="15" @bind-Value="@timecard.ShiftClockIn">
<DateTimePickerEvents TValue="DateTime?" ValueChange="ValueChangeHandler"></DateTimePickerEvents>
</SfDateTimePicker>
</td>
</tr>
and the ValueChangeHandler:
public void ValueChangeHandler(ChangedEventArgs<DateTime?> args)
{
timecard.ShiftClockOut = new DateTime(timecard.ShiftClockIn.Year, timecard.ShiftClockIn.Month, timecard.ShiftClockIn.Day, 12, 0, 0);
timecard.LunchClockOut = new DateTime(timecard.ShiftClockIn.Year, timecard.ShiftClockIn.Month, timecard.ShiftClockIn.Day, 12, 0, 0);
timecard.LunchClockIn = new DateTime(timecard.ShiftClockIn.Year, timecard.ShiftClockIn.Month, timecard.ShiftClockIn.Day, 12, 0, 0);
}
PREVIOUS WORKING CODE:
<SfDateTimePicker TimeFormat="HH:mm" Step="15" @bind-Value="@(timecard.ShiftClockOut)"></SfDateTimePicker>