I'm using fullcalendar 5 and have some recurring weekly Events on a weekly calendar. The Events are initialized by the backend. I can change the times of those events via drag, resize, or with code, but when I go forward or back a week with the Prev/Next buttons, they revert to their prior time.
Is there a way to change a recurring event such that whatever is handling the repeat logic knows about it so that the new time is retained?
For changing with code, setStart() and setEnd() change the event on the page. But then prev/next does not retain the change. I start assign startTime and endTime values but that didn't help.
I got it to work by remove the event and adding a new one. Don't know if there's a more elegant solution.
let weekDay = '' + myEvent.start.getDay();
let startTime = myEvent.start.toTimeString().split(' ')[0];
let endTime = myEvent.end.toTimeString().split(' ')[0];
let newEvent = { "start" : new Date(myEvent.start),
"end" : new Date(myEvent.end),
"startTime" : startTime,
"endTime" : endTime,
"daysOfWeek" : weekDay,
"title" : "XYZZY",
"id" : "111",
};
myEvent.remove();
this.addEvent(newEvent);