mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: missing data on boundary dates in weekly calendar view (#6587)
This commit is contained in:
parent
d9710fbb59
commit
8e90850e14
@ -108,7 +108,7 @@ const useEvents = (
|
|||||||
title: string;
|
title: string;
|
||||||
},
|
},
|
||||||
date: Date,
|
date: Date,
|
||||||
view: (typeof Weeks)[number],
|
view: (typeof Weeks)[number] | any = 'month',
|
||||||
) => {
|
) => {
|
||||||
const parseExpression = useLazy<typeof import('cron-parser').parseExpression>(
|
const parseExpression = useLazy<typeof import('cron-parser').parseExpression>(
|
||||||
() => import('cron-parser'),
|
() => import('cron-parser'),
|
||||||
@ -132,8 +132,8 @@ const useEvents = (
|
|||||||
const intervalTime = end.diff(start, 'millisecond', true);
|
const intervalTime = end.diff(start, 'millisecond', true);
|
||||||
|
|
||||||
const dateM = dayjs(date);
|
const dateM = dayjs(date);
|
||||||
const startDate = dateM.clone().startOf('month');
|
const startDate = dateM.clone().startOf(view);
|
||||||
const endDate = startDate.clone().endOf('month');
|
const endDate = startDate.clone().endOf(view);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* view === month 时,会显示当月日程
|
* view === month 时,会显示当月日程
|
||||||
@ -425,7 +425,6 @@ export const Calendar: any = withDynamicSchemaProps(
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
const BigCalendar = reactBigCalendar?.BigCalendar;
|
const BigCalendar = reactBigCalendar?.BigCalendar;
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<div className={`${hashId} ${containerClassName}`} style={{ height: height || 700 }}>
|
<div className={`${hashId} ${containerClassName}`} style={{ height: height || 700 }}>
|
||||||
<PopupContextProvider visible={visible} setVisible={setVisible}>
|
<PopupContextProvider visible={visible} setVisible={setVisible}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user