feat(events): default calendar selection to today

The month-grid calendar opened with no day selected, so the events panel
below was empty until the user clicked a day. Initialise the selection to
today (currentMonth already starts on the current month) so it opens
showing today's events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-16 00:26:26 +02:00
commit 3dfa69315c

View file

@ -68,7 +68,9 @@ function getDotCount(date: Date): number {
return Math.min(getEventsForDay(date).length, 3)
}
const selectedDay = ref<Date | null>(null)
// Default the selection to today so the calendar opens on today's events
// rather than an empty panel (currentMonth already starts on this month).
const selectedDay = ref<Date | null>(new Date())
const selectedDayEvents = computed(() => {
if (!selectedDay.value) return []
return getEventsForDay(selectedDay.value)