@using Syncfusion.EJ2.Blazor.Calendars;
<EjsDatePicker ValueChange="DateChange" @oninput="OnTextChange"></EjsDatePicker>
<p>@dateValue</p>
<EjsTimePicker ValueChange="TimeChange" @oninput="OnTextChange"></EjsTimePicker>
<p>@timeValue</p>
@code{
private DateTime? dateValue { get; set; }
private DateTime? timeValue { get; set; }
public void DateChange(ChangedEventArgs args)
{
dateValue = args.Value;
}
public void TimeChange(Syncfusion.EJ2.Blazor.Calendars.ChangeEventArgs args)
{
timeValue = args.Value;
}
public void OnTextChange(Microsoft.AspNetCore.Components.ChangeEventArgs args)
{
Console.WriteLine(args.Value);
}
} |