Fixed events from next month not appearing

This commit is contained in:
Alexis
2024-04-03 19:00:43 +02:00
parent c26bc80c69
commit 253a548f7d
2 changed files with 7 additions and 1 deletions

View File

@@ -92,7 +92,10 @@ export const useCalendarEvents = defineStore('calendar-events', () => {
function shouldEventBeDisplayed(event: CalendarEvent): boolean {
switch (currentConfig.viewType) {
case 'month':
return event.date.month === Number(currentDate.currentMonth)
return (
event.date.month === Number(currentDate.currentMonth) ||
(event.date.month === Number(currentDate.currentMonth) + 1 && event.date.day <= 8) // This is to allow leap events from appearing on the last 8 tiles
)
case 'year':
return event.date.year === Number(currentDate.currentYear)