hi mats,
To reporoduce, just replace the data.json content in angular drag from grid example with the format mentioned above. If you want I can share the json file.
The auto reschedule logic works with the default data.json file provided in the example, but not with the json format I am using.
Mats, I would need to send the data.json file which contains the events data I need to populate on UI. Shall I send seperately or DM to you?
Steps:
1. Replace the content the data.json file in angular drag from grid example with the file mentioned above
2. Change the start dates and end dates.
Run the solution, hit auto reschedule button, Drag an event and drop on another, It wont get shifted.
It's because you have copy pasted code and hoped that it would work. Please review code before copying, it's explained in the code that it only modifies events *in the future*. Remove this check and it will work as you want:
TaskStore.js
// Split tasks into future and earlier tasks, ignoring tasks in the past
eventRecord.resource.events.forEach(event => {
// Don't modify events in the past
if (event.endDate > Date.now() && event !== eventRecord) {
if (event.startDate >= eventRecord.startDate) {
futureEvents.push(event);
}
else {
earlierEvents.push(event);
}
}
});