setEvents is not updating the calendar with new database call

Greetings,

When I use the setEvents method with static data everything works fine. However, when I try to populate it with dynamic data from a database call, it doesn’t update the calendar. What is weird is the calendar will load fine with dynamic data on page load. The video explains the issue in detail:

Hi there,

Thanks for the detailed explanation! :+1:

Can you please share the click event listener code to check it in text format as well?

I’m asking because I couldn’t fully determine how are you updating the events dynamically. It looks to me that after the data processing you’re re-initializing the eventcalendar. Am I right or I’m missing something form the video?

In case of dynamic event update you’ll only need to call the setEvents method on the component instance to refresh the event data. If you need multiple options updates you can use the setOptions method to update other options as well.