From 1e4774125729e54c84703cb92516a5c3a3104309 Mon Sep 17 00:00:00 2001 From: Abhinav Ohri Date: Tue, 22 Sep 2026 16:27:42 +0530 Subject: [PATCH] fix(calendar): focus today in list view Assisted-by: Codex:gpt-5 Signed-off-by: Abhinav Ohri --- src/components/CalendarGrid.vue | 8 ++++---- src/styles/fullcalendar.scss | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/CalendarGrid.vue b/src/components/CalendarGrid.vue index 573f68bc01..c151c27dd4 100644 --- a/src/components/CalendarGrid.vue +++ b/src/components/CalendarGrid.vue @@ -170,7 +170,7 @@ export default { droppable: true, eventReceive: this.handleEventReceive, eventShortHeight: 38, - loading: this.scrollMonthViewToToday, + loading: this.scrollViewToToday, } }, @@ -321,17 +321,17 @@ export default { methods: { /** - * Scroll the month view to today when loading the calendar, + * Scroll the month or list view to today when loading the calendar, * so people can directly see today's date and events. * * @param {boolean} isLoading Whether the calendar is still loading */ - scrollMonthViewToToday(isLoading) { + scrollViewToToday(isLoading) { if (isLoading) { return } const calendarApi = this.$refs.fullCalendar.getApi() - if (calendarApi.view.type !== 'dayGridMonth') { + if (calendarApi.view.type !== 'dayGridMonth' && calendarApi.view.type !== 'listMonth') { return } this.$nextTick(() => { diff --git a/src/styles/fullcalendar.scss b/src/styles/fullcalendar.scss index a6e71f89c6..ec97c97c7b 100644 --- a/src/styles/fullcalendar.scss +++ b/src/styles/fullcalendar.scss @@ -60,7 +60,8 @@ // Today highlighting .fc-day-today { - &.fc-col-header-cell { + &.fc-col-header-cell, + &.fc-list-day { a, span { padding: 2px 6px; font-weight: bold;