Using the Calendar+Scheduler integration.
When datepicker.showEvents is enabled, changing the date in Timeline view will determine 2 date change events, with conflicting new.startDate and new.endDate values.
(About 70 date change events are actually fired, but I filtered the ones with changed == true, as seen below).
To replicate, please add this to the calendar's configuration in the default demo (https://bryntum.com/products/calendar/examples/calendar-scheduler/):
datePicker: {
showEvents: true,
},
listeners: {
dateRangeRequested: (event) => {
if ( ! event.changed) return;
console.table({
startDate: event.new.startDate.toDateString(),
endDate: event.new.endDate.toDateString(),
});
}
},
As soon as you apply the changes, you should already see 3 events in the console, where the third is the same as the first one:
The ranges are sometimes unexpected, too (not sure why it reports Oct 01 - Nov 12, whereas the week Oct 07 - Oct 14 makes sense).
If you switch from 12th to 18th, you should see one change event:
But if you now switch to 17th, you should see two change events:
The first one refers to the Oct 01 - Nov 12 interval again.
These would go unnoticed, however in our application we are loading events on demand and we're listening to date change events in order to know what to load. But the date ranges Calendar gives are conflicting, the application makes multiple requests, and since the dateRangeRequested event fires again a couple more times after the data is loaded, Calendar goes into an infinite fetch loop.
Please can you confirm if this is a bug and whether we can work around it somehow.
Thanks!