DayView
Standalone schedule day view component
Source
LLM docs
Docs
Package
Usage
DayView displays events for a single day with time slots. It supports all-day events, overlapping events, drag and drop, custom time ranges, and more.
Time range
Use startTime and endTime props to set the visible time range. Times should be in HH:mm:ss format.
This is useful for focusing on specific hours like business hours.
Interval minutes
intervalMinutes prop controls the granularity of time slots. Default is 15 minutes.
Common values are 15, 30, or 60 minutes.
All-day events
Events that span the entire day are displayed in a dedicated all-day section at the top. When there are more than 2 all-day events, the component shows a "More events" indicator.
Overlapping events
When multiple events overlap in time, they are automatically positioned side by side with appropriate widths and offsets.
Current time indicator
Set withCurrentTimeIndicator to display a line showing the current time.
By default, it's only shown for the current day. Set withCurrentTimeBubble={false}
to hide the time bubble.
Business hours
Use highlightBusinessHours and businessHours props to visually distinguish business hours
from non-business hours. The businessHours prop accepts a tuple with start and end times
in HH:mm:ss format.
Slot height
Customize the height of time slots and the all-day section using slotHeight and
allDaySlotHeight props. The slotHeight represents the height of a 1-hour slot.
Without header
Set withHeader={false} to hide the header controls. This is useful when you want to
build a custom header or embed the view in a larger component.
Header format
Use headerFormat prop to customize the date format in the header. The format uses
dayjs format syntax or can be a function that returns a formatted string.
Slot label format
slotLabelFormat prop controls the format of time labels. It accepts a dayjs format string
or a function that returns a formatted string.
Radius
Use radius prop to control the border radius of the day view container.
Drag and drop
Enable drag and drop by setting withDragDrop prop. Use onEventDrop callback to handle
event drops. All-day events cannot be dragged.
Selective drag permissions
Use canDragEvent callback to control which events can be dragged. This is useful for
implementing locked or read-only events.
Custom event rendering
Use renderEventBody prop to customize how events are displayed. This allows you to
add custom icons, badges, or any other content to events.
Full event customization
Use renderEvent prop to fully customize event rendering. This function receives the event
data as the first argument and all props that would be passed to the event root element
(including children) as the second argument, allowing you to wrap events in custom components
like HoverCard, Tooltip, or custom wrappers.
Static mode
Set mode="static" to disable all interactions. In static mode, events and time slots
are not clickable, draggable, or hoverable. This is useful for read-only displays or reports.
Custom labels
Use labels prop to override default labels for internationalization or custom text.
Controlled date
Control the date externally using the date prop and onDateChange callback.
This allows you to build custom navigation or integrate with other components.
February 12, 2026
View change
Use onViewChange prop to handle view level changes when the user clicks on view selector buttons.
Selected view: day
Create and update events
Set withDragSlotSelect prop to allow users to drag across time slots to select a time range.
When the drag ends, the onSlotDragEnd callback is called with the range start and end dates.
Combined with onTimeSlotClick, onAllDaySlotClick, and onEventClick callbacks, this enables
a complete event creation and editing experience.
Accessibility
Focus management
In the DayView component, focus is managed to provide an efficient keyboard navigation experience:
- Only the first time slot is included in the tab order (
tabIndex={0}) - All other time slots have
tabIndex={-1}and can only be reached via arrow key navigation - This approach reduces the number of tab stops when navigating through the schedule
Keyboard interactions
Slot labels
Each time slot button has an aria-label attribute with the complete slot information including the time range (e.g., "Time slot 08:00:00 - 09:00:00"). This provides screen reader users with complete context about each slot.