Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/CalendarGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default {
droppable: true,
eventReceive: this.handleEventReceive,
eventShortHeight: 38,
loading: this.scrollMonthViewToToday,
loading: this.scrollViewToToday,
}
},

Expand Down Expand Up @@ -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(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/styles/fullcalendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading