Hello,
I am trying to figure out why my calendar displays the settings I have loaded but doesn't adjust the calendar to match, nor does it show any events until after I change the view.
When it opens:
After view change:
This is my code for onInitialized:
protected override async Task OnInitializedAsync()
{
await Task.Run(() => GetChurchIDAsync());
EventsList = await Task.Run(() => GetEventsListAsync());
LoadCalendarSettings();
}
The Calendar settings I have saved in a table since multiple users will be using my program, I needed it to save the settings for each user and load them. The EventsList is the datasource for the scheduler.
Hi Andrew,
We have prepared a sample to reproduce your reported issue but unfortunately, we were unable to reproduce it.
Kindly try the attached sample and if the issue persists still share the below details to validate your reported issue and serve you better.
We will be happy to assist you..!
Regards,
Ruksar Moosa Sait
I got it to work while I was looking into the timezone process. I used this guide: https://blazor.syncfusion.com/documentation/scheduler/timezone and the section that showed how to do it based on client's time zone. I needed the
protected override async Task OnAfterRenderAsync(bool firstRender)
part and now it loads as expected.
The only issue I'm having right now is that after I double click an appointment, I can't get the editor window to close with this:
ScheduleRef.CloseEditor();
I put a StateHasChanged after it but then it loops endlessly through my update code.
Hi Andrew,
Thanks for the update
To prevent opening of editor window on event double click, you can set args.Cancel to true and bind it to OnEventDoubleClick event like the below code snippet.
|
public void OnEventDoubleClick(EventClickArgs<AppointmentData>args) { args.Cancel = true; } |
Kindly try the above solution and let us know if this meets your requirement.
Regards,
Ruksar Moosa Sait
Hello,
That's not what my issue is, it's the opposite actually. I need to manually close the editor window and that's what I can't seem to get to work.
Thanks,
Andrew
Hi Andrew,
We have prepared a sample to manually close the Editor window on a button click. Kindly try the attached sample and let us know if you need further assistance.
Regards,
Ruksar Moosa Sait