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:
parent
d4d088fb50
commit
50d6fbfc0e
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue