Skip to content

Commit

Permalink
fix: year panel label
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Feb 9, 2025
1 parent 642b10b commit 0cb687c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/useCalendar/useCalendarPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function useCalendarPanel(_props: Reactivify<CalendarPanelProps>, context
return yearFormatter.value.format(context.getFocusedDate().toPlainDateTime());
}

return `${yearFormatter.value.format(context.getFocusedDate().subtract({ years: 4 }).toPlainDateTime())} - ${yearFormatter.value.format(context.getFocusedDate().add({ years: 4 }).toPlainDateTime())}`;
return `${yearFormatter.value.format(years.value[0].value.toPlainDateTime())} - ${yearFormatter.value.format(years.value[years.value.length - 1].value.toPlainDateTime())}`;
});

return { currentPanel, switchPanel, panelLabel };
Expand Down

0 comments on commit 0cb687c

Please sign in to comment.