Where should i put this code ?
occurrence.recurrenceRule = null;
Animal wrote: ↑Wed Mar 22, 2023 5:38 pmtobias.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:
Screenshot 2023-03-22 at 16.38.15.png
But i only get this tab if i set enableRecurringEvents to true
if (eventRecord.isOccurrence) {
const chapterNumber = eventRecord.occurrenceIndex + 1
event_name = 'Cap. ' + chapterNumber
eventRecord.recurrenceRule = null;
}
I tried something like this, but now the component is not respecting de rule from the recurrence tab
We do not support that. It is not recurring events in that case, but simple events that added with some period. So, you need to add them one by one into eventStore yourself, using data you need (name, dates, etc). It's not supported with recurringEvents feature and cannot be done using that feature, because main goal of that feature is to reduce amount of events in database using rules instead of instances.
Regarding to this code you posted
if (eventRecord.isOccurrence) {
const chapterNumber = eventRecord.occurrenceIndex + 1
event_name = 'Cap. ' + chapterNumber
eventRecord.recurrenceRule = null;
}
We do not support change any data of record inside renderer. See docs here https://bryntum.com/products/schedulerpro/docs/api/Scheduler/view/mixin/SchedulerEventRendering#config-eventRenderer after IMPORTANT text.
All the best,
Alex