From 15fed264bb5cfcd6406d04eacb4481710e349e7a Mon Sep 17 00:00:00 2001 From: yuchenglong Date: Mon, 12 Jan 2026 17:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=8E=86=E6=A8=A1?= =?UTF-8?q?=E6=80=81=E6=A1=86=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=BF=87=E5=8E=BB?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A3=80=E6=9F=A5=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=8A=E5=A4=A9=E5=92=8C=E8=BF=87=E5=8E=BB=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/simple-calendar.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/components/simple-calendar.tsx b/components/simple-calendar.tsx index 49dc942..eed5254 100644 --- a/components/simple-calendar.tsx +++ b/components/simple-calendar.tsx @@ -155,8 +155,17 @@ export function CalendarModal({ date.getMonth() === selectedDate.getMonth() && date.getFullYear() === selectedDate.getFullYear(); - const isToday = - new Date().toDateString() === date.toDateString(); + const isToday = today.toDateString() === date.toDateString(); + + // Check if date is in the past (before today) + const isPast = + !isToday && + date < + new Date( + today.getFullYear(), + today.getMonth(), + today.getDate() + ); return (