Major new version #2

Merged
LeoVasanko merged 86 commits from vol002 into main 2025-08-26 05:58:24 +01:00
Showing only changes of commit 916d1d100a - Show all commits

View File

@ -167,8 +167,18 @@ function createWeek(virtualWeek) {
// Build day events starting with stored (base/spanning) then virtual occurrences
const dayEvents = [...storedEvents]
for (const base of repeatingBases) {
// Skip if base spans this date
if (dateStr >= base.startDate && dateStr <= base.endDate) continue
// If the current date falls within the base event's original span, include the base
// event itself as occurrence index 0. Previously this was skipped which caused the
// first (n=0) occurrence of repeating events to be missing from the calendar.
if (dateStr >= base.startDate && dateStr <= base.endDate) {
dayEvents.push({
...base,
// Mark explicit recurrence index for consistency with virtual occurrences
_recurrenceIndex: 0,
_baseId: base.id,
})
continue
}
// Check if any virtual occurrence spans this date
const baseStart = fromLocalString(base.startDate)