{headerTitle}
{#if currentView === "month"}
{#each weekDayHeaders as day}
{day}
{/each}
{#each weeks as week}
{#each week as day} {@const dayEvents = getEventsForDay(day)} {@const isToday = isSameDay(day, today)} {@const inMonth = isCurrentMonth(day)}
onDateClick?.(day)} > {day.getDate()} {#each dayEvents.slice(0, 2) as event} {/each} {#if dayEvents.length > 2} +{dayEvents.length - 2} more {/if}
{/each}
{/each}
{/if} {#if currentView === "week"}
{#each weekDates as day} {@const dayEvents = getEventsForDay(day)} {@const isToday = isSameDay(day, today)}
{weekDayHeaders[(day.getDay() + 6) % 7]}
{day.getDate()}
{#each dayEvents as event} {/each}
{/each}
{/if} {#if currentView === "day"} {@const dayEvents = getEventsForDay(currentDate)}
{#if dayEvents.length === 0}

No events for this day

{:else}
{#each dayEvents as event} {/each}
{/if}
{/if}