Fixed today button not working on different years

This commit is contained in:
Alexis
2024-04-03 20:59:19 +02:00
parent f5f343b112
commit 10e5cf7a1a

View File

@@ -161,7 +161,10 @@ export const useCalendar = defineStore('calendar', () => {
const isCurrentScreenActive = computed(() => {
switch (currentConfig.value.viewType) {
case 'month':
return defaultDate.value.month === Number(currentDate.currentMonth.value)
return (
defaultDate.value.month === Number(currentDate.currentMonth.value) &&
defaultDate.value.year === Number(currentDate.currentYear.value)
)
case 'year':
case 'decade':