Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-03-17 02:10:02 +00:00
commit 743a9c755e
2 changed files with 7 additions and 10 deletions

View File

@ -153,9 +153,6 @@ export const DatePicker: ComposedDatePicker = (props: any) => {
return disabledTime; return disabledTime;
}); });
}; };
console.log(disabledDate);
const newProps = { const newProps = {
utc, utc,
...props, ...props,

View File

@ -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);
let startDate = dateM.clone().startOf('month'); const startDate = dateM.clone().startOf('month');
let endDate = startDate.clone().endOf('month'); const endDate = startDate.clone().endOf('month');
/** /**
* view === month * view === month
@ -141,16 +141,16 @@ const useEvents = (
* 10.1 9.25 * 10.1 9.25
* 10.31 10.5 * 10.31 10.5
*/ */
if (view === 'month') { // if (view === 'month') {
startDate = startDate.startOf('week'); // startDate = startDate.startOf('week');
endDate = endDate.endOf('week'); // endDate = endDate.endOf('week');
} // }
const push = (eventStart: Dayjs = start.clone()) => { const push = (eventStart: Dayjs = start.clone()) => {
// 必须在这个月的开始时间和结束时间,且在日程的开始时间之后 // 必须在这个月的开始时间和结束时间,且在日程的开始时间之后
if ( if (
eventStart.isBefore(start) || // 开始时间早于 start eventStart.isBefore(start) || // 开始时间早于 start
(!eventStart.isBetween(startDate, endDate) && !end.isBetween(startDate, endDate)) // 开始时间和结束时间不在月份范围内 (!eventStart.isBetween(startDate, endDate, null, '[]') && !end.isBetween(startDate, endDate)) // 开始时间和结束时间不在月份范围内
) { ) {
return; return;
} }