Hi,
I have a Scheduler control on my page. I'm using only the Day view and I'm using ScheduleResources.
During the initialization of the component I'm loading events for today and the resources as well:
protected override async Task OnInitializedAsync()
{
selectedDate = DateTime.Now.Date;
Appointments = (await calendarService.GetAppointments(selectedDate)).ToList();
Resources = (await calendarService.GetResources()).ToList();
}
And when the user change the date in the scheduler, I would like to load events for the selected date:
protected async void OnActionCompleted(ActionEventArgs
args){
switch (args.RequestType)
{
case "dateNavigate":
case "viewNavigate":
var dates = await ScheduleRef.GetCurrentViewDates();
var selectedDate = (DateTime)dates[0];
Appointments = (await calendarService.GetAppointments(selectedDate)).ToList();
break;
}
}
However this doesn't work!
ScheduleRef.GetCurrentViewDates() is returning an empty list!
Can someone tell me how to handle such simple case?
Thanks
Mohamed