diff --git a/anwendung/src/components/CalendarSideBar.jsx b/anwendung/src/components/CalendarSideBar.jsx index df841a4..d4a0178 100644 --- a/anwendung/src/components/CalendarSideBar.jsx +++ b/anwendung/src/components/CalendarSideBar.jsx @@ -26,12 +26,12 @@ export default function BasicDateCalendar(p) { ) } -function getMonthName(monthIndex) -{ - if (startParts[2] < endParts[2]) - { - - }else return months[startParts[1] - 1 + monthIndex][0] +function getMonthName(monthIndex) { + if (startParts[1] - 1 + monthIndex < 12) { + return months[startParts[1] - 1 + monthIndex][0]; + } else { + return months[startParts[1] - 1 + monthIndex - 12][0]; + } } function generateCalendar(start, ende)