Hello, i'm trying to use RecurringEvents of scheduler pro v5.3.0. First, i want to know if it is possible to change the name of recurring event? For example, i have "Task #1" as my main task, and the recurring ones be "Task #2", "Task #3" and so one. The other situation is the only one event is been sent when i tried to save my task using the load function.
Support Forum
The EventModel
instances of recurring events which the EventStore
returns when asked for a block of events between two dates are generated on an as needed basis when a new time block is requested which contains occurrences.
They are the same event just cloned and on a different date.
If it's just the UI to look different, I recommend using an eventRenderer to change the look of events which are occurrences.
https://www.bryntum.com/products/scheduler/docs/api/Scheduler/view/Scheduler#config-eventRenderer
https://www.bryntum.com/products/scheduler/docs/api/Scheduler/model/EventModel#property-isOccurrence
We could allow apps to intervene in the creation of occurrences: https://github.com/bryntum/support/issues/6317
Maybe use the renderer like this:
eventRenderer({ renderData, eventRecord }) {
if (eventRecord.isOccurrence) {
// Mutate record silently so that calculation engine is not activated
eventRecord.setData('name', `${eventRecord.recurringTimeSpan.name} ${eventRecord.occurrenceIndex}`);
}
return StringHelper.xss`${eventRecord.name}`;
}
If your base event actually has #1
at the end you'd have to detect that yourself and do right things in your own code. This is just a hint.
Hello again, i was able to change de UI by using the eventRenderer function above, thanks for the help.
But, i need to send to my backend all recurring events. If i say the some event has to repeat daily five times, i need to send those 5 events and theirs startDate and endDate on my request. Looking to some internals functions i've found this method on EventRecord class, convertToRealEvent. Is it possible to use this function on any part on my codebase? I've tried to use on eventRenderer but a infinite loop occurs and the browser tab freeze.
occurrence.recurrenceRule = null;
Should convert it to a normal event.
Obviously, for that occurrence date you will have to add an exception date to the base. Otherwise next time you load, the occurrence will be injected there as well as the new one you just created from the original occurrence.
https://bryntum.com/products/calendar/docs/api/Scheduler/model/EventModel#field-exceptionDates
tobias.aires wrote: ↑Wed Mar 22, 2023 5:29 pmHow can i allow my user to create multiple events the repeat periodically?
It's part of the editor: