Skip to content

Commit 2f7c8dc

Browse files
BrenticusMaximusLocal Admin
andauthored
fix(ui): correct calendar header month parsing (#5532)
Co-authored-by: Local Admin <root@localhost>
1 parent e188815 commit 2f7c8dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/components/StatisticsView/MonthNavigator.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import dayjs from "dayjs";
12
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
23
import { useState } from "react";
34
import { YearCalendar } from "@/components/ActivityCalendar";
@@ -8,7 +9,7 @@ import type { MonthNavigatorProps } from "@/types/statistics";
89

910
export const MonthNavigator = ({ visibleMonth, onMonthChange, activityStats }: MonthNavigatorProps) => {
1011
const [isOpen, setIsOpen] = useState(false);
11-
const currentMonth = new Date(visibleMonth);
12+
const currentMonth = dayjs(visibleMonth).toDate();
1213
const currentYear = getYearFromDate(visibleMonth);
1314
const currentMonthNum = getMonthFromDate(visibleMonth);
1415

0 commit comments

Comments
 (0)