Install dash-mui-scheduler and render your first MUI X Scheduler calendar and timeline in Dash.

Quickstart

Install dash-mui-scheduler and render your first MUI X Scheduler calendar and timeline in Dash.


Walkthrough

A quick video tour of dash-mui-scheduler — the calendar, the resource timeline, and the radial charts in action.

<!-- component rendered from docs/quickstart/video.py; source withheld by :code: false -->

Installation

dash-mui-scheduler wraps the MUI X Scheduler for Dash. Install it from PyPI:

pip install dash-mui-scheduler

The MUI X Scheduler is in beta, and so are these wrappers. Props and behaviour may change between releases. Pin your version if you need stability.

There are three components:

This page covers the two you will reach for first: EventCalendar and EventTimeline.

Rendering an Event Calendar

Import the package as dms, hand it a list of events, and point it at a date. A standalone calendar is already fully interactive — drag, resize, create, and delete all work and persist through Dash's own setProps round-trip, with no callback required.

The dcc.Markdown readout below is wired to the calendar's lastAction output so you can watch each edit as it happens (see Reading changes).

# File: docs/quickstart/render_calendar.py

from dash import html, dcc, Input, Output, callback
import dash_mantine_components as dmc
import dash_mui_scheduler as dms

# events are plain dicts; dates are ISO strings (no Z = wall time).
# Required keys: id, title, start, end. Everything else is optional.
events = [
    {
        "id": "1",
        "title": "Team Standup",
        "start": "2024-01-15T09:00:00",
        "end": "2024-01-15T09:30:00",
        "color": "blue",
    },
    {
        "id": "2",
        "title": "Design Review",
        "start": "2024-01-16T13:00:00",
        "end": "2024-01-16T14:30:00",
        "color": "purple",
    },
    {
        "id": "3",
        "title": "Sprint Demo",
        "start": "2024-01-18T15:00:00",
        "end": "2024-01-18T16:00:00",
        "color": "green",
    },
]

component = dmc.Stack(
    [
        dms.EventCalendar(
            id="quickstart-cal",
            events=events,
            defaultVisibleDate="2024-01-15",
            defaultView="week",
            height=600,
        ),
        dmc.Text("Last action", fw=600, size="sm"),
        dcc.Markdown(id="quickstart-cal-readout"),
    ],
    gap="sm",
)


@callback(
    Output("quickstart-cal-readout", "children"),
    Input("quickstart-cal", "lastAction"),
)
def show_last_action(last_action):
    if not last_action:
        return "_Drag, create, or delete an event to see the last action._"
    action_type = last_action.get("type")
    event = last_action.get("event") or {}
    title = event.get("title", "—")
    return f"**{action_type}** → `{title}`"

The events model

events is a list of plain dicts. Dates are ISO strings, never Python datetime objects. A string with no trailing Z (e.g. "2024-01-15T10:00:00") is wall time; a trailing Z (e.g. "2024-01-15T10:00:00Z") is UTC.

Every event requires four keys:

KeyTypeExample
idstr or int"1"
titlestr"Team Standup"
startISO str"2024-01-15T09:00:00"
endISO str"2024-01-15T09:30:00"

Common optional keys include color (one of the 11 palette names: red, pink, purple, indigo, blue, teal, green, lime, amber, orange, grey), description, allDay, resource, draggable, resizable, and readOnly.

The component writes the entire new array back to events on every create, move, resize, or delete. Read events in a callback to get the current state, or read lastAction to get just the change that triggered it.

Reading changes

You never need a callback to make the calendar work — only to display what changed. lastAction is an output-only prop shaped like {type, event, event_timestamp}, where type is one of create, update, delete, move, resize, or change, and event is the affected event dict (or None for some actions).

The example above attaches this minimal callback to surface it:

@callback(
    Output("quickstart-cal-readout", "children"),
    Input("quickstart-cal", "lastAction"),
)
def show_last_action(last_action):
    if not last_action:
        return "_Drag, create, or delete an event to see the last action._"
    action_type = last_action.get("type")
    event = last_action.get("event") or {}
    return f"**{action_type}** → `{event.get('title', '—')}`"

Create or drag an event in the calendar above and the readout updates in place.

Rendering an Event Timeline

EventTimeline is the Premium resource-row view — a Gantt-style layout where each resource is a row and each event sits on the row named by its resource id. Resources are dicts like {"id": "team-a", "title": "Team A"}. The timeline shares the same events model (ISO strings, events in/out, lastAction); it just adds zoom presets such as dayAndHour (default), dayAndWeek, and monthAndYear.

EventTimeline (and EventCalendarPremium) are Premium components. Without a valid licenseKey they render with a watermark — that is expected. Set MUI_X_LICENSE_KEY in your environment to remove it. The component still functions either way.

# File: docs/quickstart/render_timeline.py

import os

import dash_mantine_components as dmc
import dash_mui_scheduler as dms

# Resources are the rows of the timeline. Each event points at a resource id.
resources = [
    {"id": "team-a", "title": "Team A"},
    {"id": "team-b", "title": "Team B"},
]

events = [
    {
        "id": "1",
        "title": "Migration",
        "start": "2024-01-15T09:00:00",
        "end": "2024-01-15T15:00:00",
        "resource": "team-a",
        "color": "indigo",
    },
    {
        "id": "2",
        "title": "QA Pass",
        "start": "2024-01-15T11:00:00",
        "end": "2024-01-15T18:00:00",
        "resource": "team-b",
        "color": "amber",
    },
]

component = dmc.Stack(
    [
        dms.EventTimeline(
            id="quickstart-timeline",
            licenseKey=os.environ.get("MUI_X_LICENSE_KEY", ""),
            resources=resources,
            events=events,
            resourceColumnLabel="Teams",
            defaultVisibleDate="2024-01-15",
            defaultPreset="dayAndHour",
            height=400,
        ),
    ],
    gap="sm",
)

EventCalendar props

The full, auto-generated prop reference for the Community EventCalendar:

EventCalendar props

proptypedescription
idstring; optionalThe id used to identify this component in Dash callbacks.
areEventsDraggableboolean; optionalAllow drag-to-reschedule. Default True.
areEventsResizableboolean \a value equal to: 'start', 'end'; optionalAllow resize (bool, or restrict to "start"/"end"). Default True.
canDragEventsFromTheOutsideboolean; optionalAllow external events to be dragged in. Default False.
canDropEventsToTheOutsideboolean; optionalAllow events to be dragged out of the calendar. Default False.
classNamestring; optionalCSS class applied to the wrapping div.
defaultPreferencesdict; optionalUncontrolled initial preferences (same shape as preferences). defaultPreferences is a dict with keys: - ampm (boolean; optional) - weekStartsOn (a value equal to: 0, 1, 2, 3, 4, 5, 6; optional) - showWeekends (boolean; optional) - showWeekNumber (boolean; optional) - isSidePanelOpen (boolean; optional) - showEmptyDaysInAgenda (boolean; optional)
defaultViewa value equal to: 'day', 'week', 'month', 'agenda'; optionalUncontrolled initial view. Default "week".
defaultVisibleDatestring; optionalUncontrolled initial visible date (ISO string). Default today.
defaultVisibleResourcesdict; optionalUncontrolled initial resource visibility map. Default {} (all visible).
displayTimezonestring; optionalTimezone used to render events: an IANA name ("America/New_York"), or "default" / "locale" / "UTC". Render-only — events keep their own data timezone. Default "default".
eventColora value equal to: 'red', 'pink', 'purple', 'indigo', 'blue', 'teal', 'green', 'lime', 'amber', 'orange', 'grey'; optionalThe default color palette used for all events. Overridden per resource (eventColor) and per event (color). Default "teal".
eventCreationdict; optionalConfigures event creation. False disables it; True enables it with defaults; an object sets the interaction and default duration (minutes). eventCreation is a boolean \dict with keys: - interaction (a value equal to: 'click', 'double-click'; optional) - duration (number; optional)
eventDialogTopOffsetnumber; optionalOn desktop, inset the event drawer this many px from the top — e.g. set it to your fixed app header's height so the drawer lines up with a sidebar instead of covering the header. Default 0.
eventDialogVarianta value equal to: 'drawer', 'dialog'; default 'drawer'How the event editor is presented. "drawer" (default) restyles the built-in dialog into a responsive drawer — right-anchored on desktop, an 80%-height bottom sheet on mobile (below mobileBreakpoint), with a scrollable body and pinned header/actions. "dialog" keeps the library's default floating, draggable dialog.
eventslist of dicts; optionalThe events to render. Each event is a dict with at least id, title, start and end (ISO strings). This is BOTH an input and an output: the calendar writes the full array back on every create / edit / move / resize / delete. events is a list of dicts with keys: - id (string \number; required): Unique id (string or number). - title (string; required): Event title. - start (string; required): Start date-time, ISO string. "Z" suffix = UTC instant. - end (string; required): End date-time, ISO string. "Z" suffix = UTC instant. - description (string; optional): Optional longer description (shown in the event dialog). - timezone (string; optional): IANA timezone the wall-time start/end are interpreted in. - resource (string \number; optional): Id of the resource this event belongs to. - rrule (string \dict; optional): Recurrence rule — an RFC-5545 RRULE string ("FREQ=WEEKLY;INTERVAL=2;BYDAY=TH") or an object {freq, interval, byDay, byMonthDay, byMonth, count, until}. Recurrence is a Premium feature (use EventCalendarPremium). - exDates (list of strings; optional): Exception dates (ISO strings) excluded from the recurrence. - allDay (boolean; optional): Whether the event spans the whole day. - readOnly (boolean; optional): Whether the event cannot be edited / dragged / resized. - color (a value equal to: 'red', 'pink', 'purple', 'indigo', 'blue', 'teal', 'green', 'lime', 'amber', 'orange', 'grey'; optional): Event color (overrides resource + component color). - draggable (boolean; optional): Per-event drag override. - resizable (boolean \a value equal to: 'start', 'end'; optional): Per-event resize override (bool or which edge). - className (string; optional): Custom CSS class for the event element. - extractedFromId (string \number; optional): Id of the event this one was split from.
heightnumber \string; default 600Height of the wrapping container (the calendar fills it). Default 600.
lastActiondict; optionalConvenience OUTPUT describing the most recent change to events: {type: "create"\"update"\"delete"\"move"\"resize"\"change", event: the affected event (or None), event_timestamp}. lastAction is a dict with keys: - type (string; optional) - event (dict; optional) - event_timestamp (number; optional)
localeTextdict; optionalOverride UI label strings (a partial map of translation keys).
mobileBreakpointnumber; default 768Width (px) below which the UI switches to its mobile layout. Default 768.
preferencesdict; optionalControlled user preferences. Also an OUTPUT. {ampm, weekStartsOn (0=Sun..6=Sat), showWeekends, showWeekNumber, isSidePanelOpen, showEmptyDaysInAgenda}. preferences is a dict with keys: - ampm (boolean; optional) - weekStartsOn (a value equal to: 0, 1, 2, 3, 4, 5, 6; optional) - showWeekends (boolean; optional) - showWeekNumber (boolean; optional) - isSidePanelOpen (boolean; optional) - showEmptyDaysInAgenda (boolean; optional)
preferencesMenuConfigdict; optionalWhich items appear in the preferences menu, or False to hide the menu. preferencesMenuConfig is a a value equal to: false \dict with keys: - toggleWeekendVisibility (boolean; optional) - toggleWeekNumberVisibility (boolean; optional) - toggleAmpm (boolean; optional) - toggleEmptyDaysInAgenda (boolean; optional) - toggleWeekStartsOn (boolean; optional)
readOnlyboolean; optionalGlobal read-only mode (disables create / drag / resize / dialog).
resourceslist of dicts; optionalResources events can be assigned to (supports nested children).
responsiveSidePanelboolean; default TrueWhen True (default), the side panel starts open on wide screens and collapsed below mobileBreakpoint on first render — unless you pin isSidePanelOpen via preferences / defaultPreferences.
scrollToCurrentTimeboolean; default FalseIn the day / week views, scroll the time grid on first render (and on view change) so the current-time indicator is centered in view. Pairs with showCurrentTimeIndicator. Default False.
shouldEventRequireResourceboolean; optionalRequire every event to be assigned to a resource. Default False.
showCurrentTimeIndicatorboolean; optionalShow the current-time indicator line in time views. Default True.
sxdict; optionalMUI sx styling object applied to the calendar (object form only).
viewa value equal to: 'day', 'week', 'month', 'agenda'; optionalControlled active view. Also an OUTPUT (updated on view change).
viewslist of a value equal to: 'day', 'week', 'month', 'agenda's; optionalWhich views are offered. Default ["day","week","month","agenda"].
visibleDatestring; optionalControlled visible date (ISO string). Drives which date range is shown. Also an OUTPUT — written back (ISO string) when the user navigates.
visibleResourcesdict; optionalControlled resource visibility map {resourceId: bool}. Also an OUTPUT.

Source: /quickstart

Note for AI agents: This is the static, prerendered view of an interactive Dash application served because we detected a non-JS user agent. Full prose docs: