WeekView
Standalone schedule week view component
Source
LLM docs
Docs
Package
Usage
WeekView displays events for an entire week with time slots.
Controlled date
Control the date displayed by WeekView externally using date and onDateChange props.
Oct 12 – Oct 18, 2026
Time range
Use startTime and endTime props to set the visible time range. Times should be in HH:mm:ss format.
Start scroll time
Use startScrollTime prop to set the initial scroll position, for example to open the view
at the start of business hours instead of midnight. The value must be in HH:mm:ss format.
Interval minutes
intervalMinutes prop controls the granularity of time slots. Default is 60 minutes.
Slot label interval
By default, the time column shows one label per hour. Set slotLabelInterval prop to display
labels more often, for example every 15 or 30 minutes. The value must be a multiple of
intervalMinutes, other values are rounded up to the next valid one. Increase slotHeight so
that the labels have enough space:
Sub-hour grid lines
When intervalMinutes is smaller than 60, set withSubHourGridLines={false} to display only one
grid line per hour. Events are still created and resized with the smaller interval.
First day of week
Set firstDayOfWeek to control which day starts the week. 0 is Sunday, 1 is Monday (default), etc.
Weekday format
Use weekdayFormat prop to customize the weekday names display. It accepts dayjs format strings.
Without weekend days
Set withWeekendDays={false} to hide Saturday and Sunday columns.
Highlight today
Set highlightToday to visually distinguish today's column:
Without week number
Set withWeekNumber={false} to hide the week number in the top-left corner.
Current time indicator
A line showing the current time is displayed on today's column by default.
Set withCurrentTimeIndicator={false} to hide it.
Force current time indicator
Set forceCurrentTimeIndicator to display the current time indicator on the same day of week
even when viewing a different week.
Current time indicator in a different timezone
@mantine/schedule does not perform timezone conversions. By default, the current time indicator
is positioned based on the user's local time.
To display the indicator in a different timezone, use getCurrentTime prop – a function
that returns the current time. In the example below, the current time is converted to the selected
timezone with the dayjs timezone plugin:
Without all-day slots
Set withAllDaySlots={false} to hide the all-day events section at the top.
All-day events
All-day events are displayed in a separate section at the top of the week view. Events that span midnight or cover a full day are automatically placed in this section.
Without header
Set withHeader={false} to hide the header controls.
View change callback
Use onViewChange callback to be notified when the user selects a different view from the header dropdown.
Selected view: week
Custom header
You can build a custom header using ScheduleHeader compound components combined with your own controls.
Set withHeader={false} on the view and compose the header externally.
Week label format
Use weekLabelFormat prop to customize the week range display in the header.
Slot label format
slotLabelFormat prop controls the format of time labels.
Slot height
Customize the height of time slots and the all-day section using slotHeight and
allDaySlotHeight props.
Radius
Use radius prop to change the border radius of the view and events.
Business hours
Use highlightBusinessHours and businessHours props to visually distinguish business hours.
The businessHours prop accepts a tuple with start and end times in HH:mm:ss or HH:mm format.
Business hours do not need to align with the slot grid. When a boundary falls inside a slot, the slot and the time label next to it are painted up to the exact minute:
Business hours per day
Pass an object to businessHours to configure the range for each day of the week individually.
Keys are day numbers (0 – Sunday, 6 – Saturday). Days missing from the object or set to null
are marked as fully outside business hours:
Business hours colors
Set --week-view-business-hours-bg and --week-view-non-business-hours-bg CSS variables
with vars prop or in CSS to change the colors. Both variables apply to time slots and time labels:
Custom time slot props
Use getTimeSlotProps to add props to individual time slots, for example data-business-hours
or event handlers. The function receives { start, end } datetime strings in YYYY-MM-DD HH:mm:ss
format and returns an object of props or undefined. Event handlers returned by the function
do not override internal handlers, both are called.
Overlapping events
When multiple events overlap in time, they are automatically positioned side by side.
Overlap mode
eventOverlapMode prop controls how overlapping events share the horizontal space:
columns(default) – the width is split evenly between overlapping events. Every event is fully visible, but gets narrower as more events overlap.cascade– each event is indented from the previous one and drawn on top of it. Events keep a readable width, but cover the events underneath. Use it when many events overlap at the same time.
In cascade mode, a covered event is raised above the others when it is hovered or focused.
Use eventOverlapRaiseDelay prop to change the hover delay in milliseconds, 600 by default:
Drag and drop
Enable drag and drop by setting withEventsDragAndDrop prop. Events can be dragged to different days and times.
To reject a drop based on where the event lands – for example to prevent double booking – use
preventEventOverlap and canDropEvent, see drop validation.
Drag interval
By default events snap to intervalMinutes when moved by drag and drop. Set eventDragInterval
to use a different snap step for dragging – for example, a grid with 30-minute slots whose events
can be moved in 15-minute increments. A ghost preview shows where the event will land:
Restrict draggable events
Use canDragEvent callback to control which events can be dragged.
Events that return false will not be draggable.
External drag and drop
Use onExternalEventDrop to allow dragging items from outside the component into
the schedule. External items must set data in dataTransfer during their onDragStart.
The callback receives the DataTransfer object and the drop target datetime.
Drag to schedule
Quick Sync
30 min
Workshop
120 min
One-on-One
60 min
Bidirectional drag and drop
Combine onExternalEventDrop with withEventsDragAndDrop to drag items both into and out of
the schedule. When an event is dragged, the schedule sets application/json data with { eventId }
in dataTransfer. Read it in your drop zone to identify the event.
Unscheduled
Quick Sync
30 min
Workshop
120 min
One-on-One
60 min
Event resize
Enable event resizing by setting withEventResize prop. Users can drag the top or bottom
edge of an event to adjust its start or end time. Use onEventResize callback to handle
the resize.
To reject a resize based on the new range, use preventEventOverlap and canResizeEventTo, see
drop validation.
Resize interval
By default events snap to intervalMinutes when resized. Set eventResizeInterval to use a
different snap step for resizing – for example, a grid with 30-minute slots whose events can be
resized in 15-minute increments:
Restrict resizable events
Use canResizeEvent callback to control which events can be resized.
Events that return false will not show resize handles.
Full event customization
Use renderEvent prop to fully customize event rendering. The function receives the event
as the first argument and the props of the event root element (including children) as the second
argument. Use it to wrap events in HoverCard, Tooltip or other components.
Custom event body
Use renderEventBody prop to customize the content inside events without replacing
the event wrapper. This is useful for adding icons, additional text, or custom layouts.
Recurring events
WeekView automatically expands recurring events for the visible week. See Recurring events guide for full documentation.
Background events
Set display="background" on an event to render it as a full-width, semi-transparent block
behind regular events. By default it cannot be clicked, dragged, or resized. Background events
are useful for marking unavailability, lunch breaks, focus time, or other blocked periods.
Interactive background events
Set withInteractiveBackgroundEvents prop to make background events clickable. onEventClick
is called with the background event, use event.display === 'background' to tell it apart
from regular events.
An interactive background event covers the time slots underneath it: clicks and drag-to-select in its range go to the event. Interactive background events still cannot be dragged.
Last clicked: nothing yet
Resizable background events
Set withEventResize together with withInteractiveBackgroundEvents to make background events
resizable. onEventResize is called with the background event, the same way as for regular events.
All-day background events are never resizable. To keep background events fixed while
regular events stay resizable, return false from canResizeEvent:
Custom background event styles with drag and drop blocking
Use Styles API to customize background events appearance. The example below displays blocked time with diagonal red lines and rejects drops that overlap with background events.
Agenda view
Set withAgenda prop to display an "Agenda" button in the header. When clicked, it opens
an AgendaView showing events for the current week as a list.
Static mode
Set mode="static" to disable all interactions.
Localization
Use locale prop to set the dayjs locale for date formatting.
Combine it with labels prop to translate all UI text.
Create and update events
Set withDragSlotSelect prop to allow users to drag across time slots to select a time range.
The drag is constrained to a single day column. When the drag ends, onSlotDragEnd is called with
the range start and end dates. Combine it with onTimeSlotClick, onAllDaySlotClick and onEventClick
to create and edit events.
Responsive styles
WeekView uses @container queries for responsive styles. The component automatically adjusts its layout based on the container width, hiding labels and reducing padding on smaller screens. Container queries are supported in all modern browsers.
Accessibility
Focus management
The weekdays row, all-day slots row and time slots grid each have only their first element in the tab order. All other elements can be reached with arrow keys.
Keyboard interactions
Weekdays row:
All-day slots (when enabled):
Time slots:
Slot labels
Each time slot button has an aria-label attribute with the date and time range (e.g., "Time slot 2025-11-03 08:00:00 - 09:00:00"). All-day slots have labels like "All day 2025-11-03", and weekday buttons have labels like "Weekday 2025-11-03".