mirror of https://github.com/usememos/memos.git
fix(ui): correct calendar header month parsing (#5532)
Co-authored-by: Local Admin <root@localhost>
This commit is contained in:
parent
e1888153f8
commit
2f7c8dcea7
|
|
@ -1,3 +1,4 @@
|
|||
import dayjs from "dayjs";
|
||||
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { YearCalendar } from "@/components/ActivityCalendar";
|
||||
|
|
@ -8,7 +9,7 @@ import type { MonthNavigatorProps } from "@/types/statistics";
|
|||
|
||||
export const MonthNavigator = ({ visibleMonth, onMonthChange, activityStats }: MonthNavigatorProps) => {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const currentMonth = new Date(visibleMonth);
|
||||
const currentMonth = dayjs(visibleMonth).toDate();
|
||||
const currentYear = getYearFromDate(visibleMonth);
|
||||
const currentMonthNum = getMonthFromDate(visibleMonth);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue