mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: events not display in calendar block when start and end dates span across month (#5699)
This commit is contained in:
parent
5b1c0b2002
commit
f351f78936
@ -135,10 +135,12 @@ const useEvents = (
|
||||
|
||||
const push = (eventStart: Dayjs = start.clone()) => {
|
||||
// 必须在这个月的开始时间和结束时间,且在日程的开始时间之后
|
||||
if (eventStart.isBefore(start) || !eventStart.isBetween(startDate, endDate)) {
|
||||
if (
|
||||
eventStart.isBefore(start) || // 开始时间早于 start
|
||||
(!eventStart.isBetween(startDate, endDate) && !end.isBetween(startDate, endDate)) // 开始时间和结束时间不在月份范围内
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
let out = false;
|
||||
const res = exclude?.some((d) => {
|
||||
if (d.endsWith('_after')) {
|
||||
@ -162,6 +164,7 @@ const useEvents = (
|
||||
|
||||
events.push(event);
|
||||
};
|
||||
|
||||
if (cron === 'every_week') {
|
||||
let nextStart = start
|
||||
.clone()
|
||||
|
Loading…
x
Reference in New Issue
Block a user