Re: [VUE] SchedulerPro(v5.3.0) RecurringEvent change the name of recurring events
Where should i put this code ?
occurrence.recurrenceRule = null;
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
Hello,
occurrence.recurrenceRule = null;
if i put this on my eventRenderer only 1 event is created. The correct place is on eventRenderer function?
You need to get a reference to the occurrence that you are going to turn into a real, concrete event. Don't do that on the base, otherwise that will destroy the recurringness of the base.
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
I do not understand what your app requirement is, or how you are trying to get there.
recurring events are based on one single base event which has a rule. The "occurrences" of it in the future are not stored in the database.
They are just displayed in the UI according to the rule.
I think that my app requirement is to create serie of real events by some rule, for example after 2 weeks on every starting every monday, and saving those events on my database. Is this possible somehow?
How many real events? Because if it's recurring on a rule, then there will be an infinite number of them.
This value will be set by the user.
Using the recurrenceTab, i tought in using the last input, telling the component to stop after X times.
If somehow i could use this tab to get real events.
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.