Major new version #2
@ -167,8 +167,18 @@ function createWeek(virtualWeek) {
|
|||||||
// Build day events starting with stored (base/spanning) then virtual occurrences
|
// Build day events starting with stored (base/spanning) then virtual occurrences
|
||||||
const dayEvents = [...storedEvents]
|
const dayEvents = [...storedEvents]
|
||||||
for (const base of repeatingBases) {
|
for (const base of repeatingBases) {
|
||||||
// Skip if base spans this date
|
// If the current date falls within the base event's original span, include the base
|
||||||
if (dateStr >= base.startDate && dateStr <= base.endDate) continue
|
// 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
|
// Check if any virtual occurrence spans this date
|
||||||
const baseStart = fromLocalString(base.startDate)
|
const baseStart = fromLocalString(base.startDate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user