fix: incorrect repeat of calendar (#1131)

This commit is contained in:
Dunqing 2022-11-23 12:15:42 +08:00 committed by GitHub
parent 1d2c4f6188
commit d25276a23b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,8 +84,8 @@ const useEvents = (dataSource: any, fieldNames: any, date: Date, view: typeof We
startDate.startOf('week'); startDate.startOf('week');
endDate.endOf('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)) { if (eventStart.isBefore(start) || !eventStart.isBetween(startDate, endDate)) {
return; return;
} }