Fix for events repeating on mothly basis and old events that are shown as occuring today (#2624)

pull/2623/head
Denis Papec 3 months ago committed by GitHub
parent 9984e7894f
commit 674d7f2e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,8 +55,9 @@ export default function Integration({ config, params, setEvents, hideErrors }) {
}
};
if (event?.recurrenceRule?.options) {
const rule = new RRule(event.recurrenceRule.options);
const recurrenceOptions = event?.recurrenceRule?.origOptions;
if (recurrenceOptions && Object.keys(recurrenceOptions).length !== 0) {
const rule = new RRule(recurrenceOptions);
const recurringEvents = rule.between(startDate.toJSDate(), endDate.toJSDate());
recurringEvents.forEach((date, i) => eventToAdd(date, i, "recurring"));

Loading…
Cancel
Save