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

This commit is contained in:
Denis Papec authored and GitHub committed 2024-01-14 13:49:28 -08:00
1 parent 9984e7894f
commit 674d7f2e01
1 file changed
+3 -2
+3 -2
View File
@@ -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"));