When to Load Events onto Calendar

I want to dynamically load events onto the calendar from an external database. There are three calendar event triggers I see that could be used: onPageChange, onPageLoaded, and onPageLoading.

Which of these triggered events would be the correct time to load the calendar events using the firstDay and lastDay to retrieve data from the external database?

On a related note, when these events are triggered and I need to load the calendar events again, what happens if a calendar event is already in the events list, and I try to load it again (with matching event.id values)? Will the calendar ignore the event because it’s already in the events list, update it with what I pass in, or throw an error? Would be best if it updated it as it may have changed in the database from the last time it was loaded onto the calendar.

Hello @Joe :wave:

We have a demo example which is exactly the use case you just described. Take a look at it and let me know if you still have questions.