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;
});
};
console.log(disabledDate);
const newProps = {
utc,
...props,

View File

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