From d25276a23bc8d03eae3f23796023ea49c90c7fa5 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Wed, 23 Nov 2022 12:15:42 +0800 Subject: [PATCH] fix: incorrect repeat of calendar (#1131) --- .../client/src/schema-component/antd/calendar/Calendar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx b/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx index afae49a1d..1324f04dc 100644 --- a/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx +++ b/packages/core/client/src/schema-component/antd/calendar/Calendar.tsx @@ -84,8 +84,8 @@ const useEvents = (dataSource: any, fieldNames: any, date: Date, view: typeof We startDate.startOf('week'); endDate.endOf('week'); } - const push = (eventStart: moment.Moment = start) => { - // 必须在这个月的开始时间和结束时间,切在日程的开始时间之后 + const push = (eventStart: moment.Moment = start.clone()) => { + // 必须在这个月的开始时间和结束时间,且在日程的开始时间之后 if (eventStart.isBefore(start) || !eventStart.isBetween(startDate, endDate)) { return; }