Closed davidpaulquinn closed 4 years ago
Hi.
You need to handle the selection event OnRangeSelect
and call your API there, like this:
<DateRangePicker SingleDatePicker="true"
@bind-StartDate="StartDate" EndDate="StartDate"
OnRangeSelect="OnRangeSelect" />
@code {
DateTimeOffset? StartDate { get; set; } = DateTime.Now;
private async Task OnRangeSelect(DateRange range)
{
await GetRoster(range.Start);
}
}
Hi,
I'm just looking to select a single instance of the date time picker, bind it to my value and pass that to a method to call data from the api.
Thanks for any help,
Dave
DateTImePicker.txt