mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-01 21:13:39 +01:00
Fix for events repeating on mothly basis and old events that are shown as occuring today (#2624)
This commit is contained in:
parent
9984e7894f
commit
674d7f2e01
@ -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…
x
Reference in New Issue
Block a user