I'm using the following code to change the event start date
const currentStart = new Date(event.startDate);
const start = new Date(currentStart.setDate(currentStart.getDate() + 1));
event.setStartEndDate(start, event.endDate as Date);
I would expect the start date to change and the end day to stay the same, making the event shorter. This does not happen though. After the EventStore.commit the event end date is recalculated to keep the length the same.
This is expected behaviour, because with the updated startDate, endDate is recalculated and as your duration is not changing, it is updating the endDate. Try updating the duration and startDate inside the eventEditor. You can see the endDate is gonna remain same after you commit with the updated startDate and duration.
wow, this is super unexpected. What is the point of passing the endDate in setStartEndDate? If this is expected I feel like https://www.bryntum.com/products/scheduler/docs/api/Scheduler/model/EventModel#function-setStartEndDate doc needs some type of explanation of what it actually does. I assume I can achieve the desired behavior using EventModel.setStartDate with keepDuration set to true or no? And again, reading the API there are 3 methods: setStartDate, setEndDate and setStartEndDate one would think that setStartEndDate sets both start and end date and recalculates duration. I feel that if setStartEndDate doesn't do what the name implies it really needs to be documented.
Upon further investigating this issue, it came to light that setStartEndDate method is not yet not supported in SchedulerPro. The reason for this is, SchedulerPro uses a engine for scheduling and we need to implement the setStartEndDate method at the engine level. The bug was this method shouldn't be documented in the docs. We will fix the docs.