Skip to content
+

Event Timeline - Drag Interaction

Re-schedule or resize your events using drag and drop.

Events can be moved to a different time slot by dragging them, and resized by dragging their start or end edge. Both behaviors are enabled by default:

Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version

Disable event dragging

Use the areEventsDraggable property to prevent dragging events to another point in time:

<EventTimelinePremium areEventsDraggable={false} />
Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version
Press Enter to start editing

Disable event resizing

Use the areEventsResizable property to prevent resizing events by dragging their start or end edge:

<EventTimelinePremium areEventsResizable={false} />
Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version
Press Enter to start editing

Only disable on some events

Per event

Use the draggable property on the event model to prevent an event from being dragged to another point in time:

const event = {
  // ...other properties
  draggable: false,
};

Use the resizable property on the event model to prevent an event from being resized by dragging its start or end edge:

const event = {
  // ...other properties
  resizable: false,
};

Per resource

Use the areEventsDraggable property on the resource model to prevent dragging a resource's events to another point in time:

const resource = {
  // ...other properties
  areEventsDraggable: false,
};

Use the areEventsResizable property on the resource model to prevent resizing a resource's events by dragging their start or end edge:

const resource = {
  // ...other properties
  areEventsResizable: false,
};

Priority order

The priority order for determining if an event is draggable or resizable is:

  1. The draggable and resizable properties assigned to the event
<EventTimelinePremium
  events={[{ id: '1', title: 'Event 1', draggable: false, resizable: false }]}
/>
  1. The areEventsDraggable and areEventsResizable properties assigned to the event's resource
<EventTimelinePremium
  resources={[
    {
      id: '1',
      title: 'Resource 1',
      areEventsDraggable: false,
      areEventsResizable: false,
    },
  ]}
/>
  1. The areEventsDraggable and areEventsResizable props assigned to the Event Timeline
<EventTimelinePremium areEventsDraggable={false} areEventsResizable={false} />

For example, with the following code, all "work" events are not draggable except "event-3":

function App() {
  const resources = [
    { id: 'work', title: 'Work', areEventsDraggable: false },
    { id: 'personal', title: 'Personal' },
  ];

  const events = [
    { id: 'event-1', resource: 'work' },
    { id: 'event-2', resource: 'personal' },
    { id: 'event-3', resource: 'work', draggable: true },
  ];

  return <EventTimelinePremium resources={resources} events={events} />;
}

External drag and drop

You can enable the dragging from and to the outside of the Event Timeline using the canDragEventsFromTheOutside and canDropEventsToTheOutside props. When canDragEventsFromTheOutside is true, the events created with <StandaloneEvent /> can be dropped inside the Event Timeline. When canDropEventsToTheOutside is true, the events from within the Event Timeline can be dropped outside of it.

External Event 1 (30 mins)
External Event 2 (60 mins)
External Event 3 (90 mins)
External Event 4 (60 mins)
External Event 5 (45 mins)
Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version