Hi everyone, I’m having trouble updating events dynamically in Bryntum Scheduler and would greatly appreciate some guidance. I’m trying to fetch events from an external API and refresh the Scheduler so that users always see the latest data without needing to reload the page. Initially, the events render fine, but when I reload the store with new data, the timeline either duplicates events or clears everything until I refresh the page. I’ve tried eventStore.loadData(newEvents, true) and scheduler.project.commitAsync(), even removing and re-adding the store, but none of these approaches fully worked.
const scheduler = new Scheduler({
appendTo: 'container',
startDate: new Date(2025, 8, 29),
endDate: new Date(2025, 9, 5),
resources: [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }],
events: [
{ id: 1, resourceId: 1, startDate: '2025-09-29', endDate: '2025-09-30', name: 'Kickoff' },
{ id: 2, resourceId: 2, startDate: '2025-09-30', endDate: '2025-10-01', name: 'Review' }
],
features: { stripe: true }
});
fetch('/api/events')
.then(res => res.json())
.then(newEvents => {
scheduler.eventStore.loadData(newEvents, true);
scheduler.project.commitAsync();
});
Is there a recommended way to refresh the eventStore so the timeline updates correctly without duplicates or losing existing events? Any tips would be greatly appreciated!
Pips NYT