Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e1d8ff3
Anchor all-day dialog bounds to the event's own timezone
rita-codes Aug 31, 2026
8f4c935
Merge branch 'master' into scheduler-all-day-data-timezone
rita-codes Aug 31, 2026
de497a5
Reuse one builder for the cross-timezone event and its occurrence
rita-codes Aug 31, 2026
fbc0a15
Pin the cross-timezone all-day move to the next data-zone day
rita-codes Aug 31, 2026
8e2b369
Read the placeholder once and select the data timezone
rita-codes Aug 31, 2026
17ae21d
Only submit the range when a date field was edited
rita-codes Aug 31, 2026
8883f8e
Apply review: mode-aware range dirtiness, single key list, recurring …
rita-codes Aug 31, 2026
4f6485e
Identify recurring occurrences by their data-timezone start
rita-codes Aug 31, 2026
47dd1c9
Apply review round 3: keep the armed occurrence identity in sync
rita-codes Aug 31, 2026
0384121
Apply review round 4: a rename keeps the occurrence's own data identity
rita-codes Aug 31, 2026
d905388
Merge remote-tracking branch 'upstream/master' into scheduler-all-day…
rita-codes Aug 31, 2026
1b7d434
Gate the recurring range per bound: an untouched start stays out of t…
rita-codes Aug 31, 2026
1a5118c
Re-key the armed occurrence onto the changed day on an in-place scope…
rita-codes Aug 31, 2026
d357489
Document the data-bounds parameters on the store sync and the drag hook
rita-codes Aug 31, 2026
3114553
Share the occurrence delete fork: recurring scope flow vs immediate d…
rita-codes Aug 31, 2026
730785d
Extract the canonical cross-timezone all-day fixture into a shared bu…
rita-codes Aug 31, 2026
15c1f7c
Pin DST identity, day-grid drag threading, Tokyo BYDAY, multi-resourc…
rita-codes Aug 31, 2026
b96cb07
Move the cross-timezone fixture out of the generic event builder
rita-codes Aug 31, 2026
9f22b86
Merge remote-tracking branch 'upstream/master' into scheduler-all-day…
rita-codes Sep 1, 2026
a689f56
Adapt the cross-timezone tests to the vi.fn spy helpers
rita-codes Sep 1, 2026
92f28ca
Apply review: stop guessing the scope-'all' landing and couple the da…
rita-codes Sep 1, 2026
d7a42dd
Merge remote-tracking branch 'upstream/master' into scheduler-all-day…
rita-codes Sep 1, 2026
65558c5
Serialize builder occurrences as UTC instants after the exDates relabel
rita-codes Sep 1, 2026
34a24ef
Apply second review: close the disarm gap and lean on the pieces alre…
rita-codes Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import type {
} from '@mui/x-scheduler-internals/models';
import {
useDraggableEvent,
generateOccurrenceFromEvent,
useOriginalOccurrence,
computeElementPositionInCollection,
dateToTimelineAxisOffsetMs,
} from '@mui/x-scheduler-internals/internals';
import type { useElementPositionInCollection } from '@mui/x-scheduler-internals/internals';
import { useAdapterContext } from '@mui/x-scheduler-internals/use-adapter-context';
import { schedulerEventSelectors } from '@mui/x-scheduler-internals/scheduler-selectors';
import { useEventTimelinePremiumStoreContext } from '../../use-event-timeline-premium-store-context';
import { useTimelineGridEventRowContext } from '../event-row/TimelineGridEventRowContext';
import { TimelineGridEventCssVars } from './TimelineGridEventCssVars';
Expand Down Expand Up @@ -52,6 +51,7 @@ export const TimelineGridEvent = React.forwardRef(function TimelineGridEvent(
// Internal props
start,
end,
dataBounds,
eventId,
occurrenceKey,
renderDragPreview,
Expand Down Expand Up @@ -88,6 +88,14 @@ export const TimelineGridEvent = React.forwardRef(function TimelineGridEvent(
);

// Feature hooks
const getOriginalOccurrence = useOriginalOccurrence({
eventId,
occurrenceKey,
start,
end,
dataBounds,
});

const getSharedDragData: TimelineGridEventContext['getSharedDragData'] = useStableCallback(
(input) => {
// Measured on the axis so it stays consistent with the cursor offsets when a
Expand All @@ -96,21 +104,11 @@ export const TimelineGridEvent = React.forwardRef(function TimelineGridEvent(
-dateToTimelineAxisOffsetMs(adapter, config, start.value),
0,
);
const event = schedulerEventSelectors.processedEvent(store.state, eventId)!;

const originalOccurrence = generateOccurrenceFromEvent({
event,
eventId,
occurrenceKey,
start,
end,
});

const offsetInsideRow = getCursorPositionInElementMs({ input, elementRef: ref });
return {
eventId,
occurrenceKey,
originalOccurrence,
originalOccurrence: getOriginalOccurrence(),
start: start.value,
end: end.value,
initialCursorPositionInEventMs: offsetBeforeRowStart + offsetInsideRow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ import type {
} from '../../models';
import { useAdapterContext } from '../../use-adapter-context';
import { useCalendarGridDayRowContext } from '../day-row/CalendarGridDayRowContext';
import {
schedulerEventSelectors,
schedulerOccurrencePlaceholderSelectors,
} from '../../scheduler-selectors';
import { schedulerOccurrencePlaceholderSelectors } from '../../scheduler-selectors';
import { getCalendarGridHeaderCellId } from '../../internals/utils/accessibility-utils';
import { CalendarGridDayEventContext } from './CalendarGridDayEventContext';
import { useEventCalendarStoreContext } from '../../use-event-calendar-store-context';
import { useCalendarGridDayCellContext } from '../day-cell/CalendarGridDayCellContext';
import { useCalendarGridRootContext } from '../root/CalendarGridRootContext';
import { generateOccurrenceFromEvent } from '../../internals/utils/event-utils';
import { useOriginalOccurrence } from '../../internals/utils/useOriginalOccurrence';

const overflowStateAttributesMapping = {
startingBeforeEdge: (value: boolean) => (value ? { 'data-starting-before-edge': '' } : null),
Expand All @@ -45,6 +42,7 @@ export const CalendarGridDayEvent = React.forwardRef(function CalendarGridDayEve
// Internal props
start,
end,
dataBounds,
eventId,
occurrenceKey,
renderDragPreview,
Expand Down Expand Up @@ -93,21 +91,19 @@ export const CalendarGridDayEvent = React.forwardRef(function CalendarGridDayEve
);
});

const firstEventOfSeries = schedulerEventSelectors.processedEvent(store.state, eventId)!;

const originalOccurrence = generateOccurrenceFromEvent({
event: firstEventOfSeries,
const getOriginalOccurrence = useOriginalOccurrence({
eventId,
occurrenceKey,
start,
end,
dataBounds,
});

const getSharedDragData: CalendarGridDayEventContext['getSharedDragData'] = useStableCallback(
() => ({
eventId,
occurrenceKey,
originalOccurrence,
originalOccurrence: getOriginalOccurrence(),
start: start.value,
end: end.value,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ import { useElementPositionInCollection } from '../../internals/utils/useElement
import { getCalendarGridHeaderCellId } from '../../internals/utils/accessibility-utils';
import { CalendarGridTimeEventContext } from './CalendarGridTimeEventContext';
import { useAdapterContext } from '../../use-adapter-context';
import { useEventCalendarStoreContext } from '../../use-event-calendar-store-context';
import { schedulerEventSelectors } from '../../scheduler-selectors';
import type {
SchedulerEventId,
SchedulerEventOccurrence,
SchedulerResourceId,
TemporalSupportedObject,
} from '../../models';
import { useCalendarGridRootContext } from '../root/CalendarGridRootContext';
import { generateOccurrenceFromEvent } from '../../internals/utils/event-utils';
import { useOriginalOccurrence } from '../../internals/utils/useOriginalOccurrence';

export const CalendarGridTimeEvent = React.forwardRef(function CalendarGridTimeEvent(
componentProps: CalendarGridTimeEvent.Props,
Expand All @@ -35,6 +33,7 @@ export const CalendarGridTimeEvent = React.forwardRef(function CalendarGridTimeE
// Internal props
start,
end,
dataBounds,
eventId,
occurrenceKey,
renderDragPreview,
Expand All @@ -48,7 +47,6 @@ export const CalendarGridTimeEvent = React.forwardRef(function CalendarGridTimeE

// Context hooks
const adapter = useAdapterContext();
const store = useEventCalendarStoreContext();
const { id: rootId } = useCalendarGridRootContext();
const {
start: columnStart,
Expand All @@ -67,18 +65,16 @@ export const CalendarGridTimeEvent = React.forwardRef(function CalendarGridTimeE
const id = useId(idProp);

// Feature hooks
const getOriginalOccurrence = useOriginalOccurrence({
eventId,
occurrenceKey,
start,
end,
dataBounds,
});

const getSharedDragData: CalendarGridTimeEventContext['getSharedDragData'] = useStableCallback(
(input) => {
const event = schedulerEventSelectors.processedEvent(store.state, eventId)!;

const originalOccurrence = generateOccurrenceFromEvent({
event,
eventId,
occurrenceKey,
start,
end,
});

// No `input` (pointer-based resize) — skip the layout-reading cursor measurement.
const initialCursorPositionInEventMs = input
? Math.max(adapter.getTime(columnStart) - start.timestamp, 0) +
Expand All @@ -88,7 +84,7 @@ export const CalendarGridTimeEvent = React.forwardRef(function CalendarGridTimeE
return {
eventId,
occurrenceKey,
originalOccurrence,
originalOccurrence: getOriginalOccurrence(),
start: start.value,
end: end.value,
initialCursorPositionInEventMs,
Expand Down
Loading
Loading