Skip to main content

Schedule

Rocket 2.0

The Schedule component shows bookings on a timeline, with resources such as rooms, people or vehicles down the side and time across. The user can click a booking to open it or click a free slot to book it.

Properties​

Property
Description
Expected Value
ResourcesRows of the schedule, as plain names or as items with an id, name, caption and avatar. Leave empty to list each resource the bookings name.Array
BookingsBookings to place on the timeline. Times can be full dates and times, HH:mm on the day shown, or a date alone for a whole day.Array
Resource field (a resource's id or name)Field in each booking that matches it to a resource, by the resource's id or name.Text. Default: room
Start fieldField with the booking's start time.Text. Default: start
End fieldField with the booking's end time.Text. Default: end
Title fieldField shown as the booking's title.Text. Default: title
Second line fieldField shown as a second line on the booking when there is room.Text
Status field (toned by its words)Field whose value colors the booking. Common words such as Confirmed or Pending get a matching tone, and a status containing cancel is struck through.Text. Default: status
Id fieldField that identifies each booking. It fills selectedBookingId when the user clicks a booking.Text. Default: id
Time acrossHours shows the hours of one day across; Days shows a run of days.Hours, Days. Default: Hours
Date shown (empty for today)Date to show, or the first day in the Days view. Leave empty for today.Text
Day starts at (hour, or a time such as 09:00)Hour the Hours view starts at, such as 8 or 09:00.Number. Default: 8
Day ends at (hour, or a time such as 18:00)Hour the Hours view ends at, such as 18 or 18:00.Number. Default: 18
Slot length (minutes)Length in minutes of each clickable slot in the Hours view.Number. Default: 30
Days shownNumber of days shown in the Days view.Number. Default: 7
Hour formatWhether times show on a 12-hour or 24-hour clock.12h, 24h. Default: 12h
Resource column titleHeading of the resource column, such as Room or Driver.Text. Default: Room
Resource column width (px)Width of the resource column in pixels.Number. Default: 168
Row height (px)Height of each resource row in pixels. Rows with overlapping bookings grow to fit them.Number. Default: 56
Show the current timeDraws a line at the current time.On or off. Default: On
Highlight the selected bookingMarks the booking or slot the user clicked last.On or off. Default: On
Empty textMessage shown when there are no resources.Text. Default: No resources to schedule
Status colorsA color for each status word, for example { "on site": "#0ea5e9" }. Overrides the automatic tone.Object
Loading lookWhat shows while the schedule is loading: a spinner or a skeleton outline.Spinner, Skeleton. Default: Spinner

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On booking clickedTriggers when the user clicks a booking.
On slot clickedTriggers when the user clicks a free or partly booked slot.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Set visibilityShows the component when true, hides it when false.components.schedule1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.schedule1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.schedule1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
resourcesRows of the schedule, as plain names or as items with an id, name, caption and avatar. Leave empty to list each resource the bookings name.{{components.schedule1.resources}}
bookingsBookings to place on the timeline. Times can be full dates and times, HH:mm on the day shown, or a date alone for a whole day.{{components.schedule1.bookings}}
resourceFieldField in each booking that matches it to a resource, by the resource's id or name.{{components.schedule1.resourceField}}
startFieldField with the booking's start time.{{components.schedule1.startField}}
endFieldField with the booking's end time.{{components.schedule1.endField}}
titleFieldField shown as the booking's title.{{components.schedule1.titleField}}
subtitleFieldField shown as a second line on the booking when there is room.{{components.schedule1.subtitleField}}
statusFieldField whose value colors the booking. Common words such as Confirmed or Pending get a matching tone, and a status containing cancel is struck through.{{components.schedule1.statusField}}
idFieldField that identifies each booking. It fills selectedBookingId when the user clicks a booking.{{components.schedule1.idField}}
scaleHours shows the hours of one day across; Days shows a run of days.{{components.schedule1.scale}}
dateDate to show, or the first day in the Days view. Leave empty for today.{{components.schedule1.date}}
dayStartHour the Hours view starts at, such as 8 or 09:00.{{components.schedule1.dayStart}}
dayEndHour the Hours view ends at, such as 18 or 18:00.{{components.schedule1.dayEnd}}
slotMinutesLength in minutes of each clickable slot in the Hours view.{{components.schedule1.slotMinutes}}
daysNumber of days shown in the Days view.{{components.schedule1.days}}
hourFormatWhether times show on a 12-hour or 24-hour clock.{{components.schedule1.hourFormat}}
resourceTitleHeading of the resource column, such as Room or Driver.{{components.schedule1.resourceTitle}}
resourceWidthWidth of the resource column in pixels.{{components.schedule1.resourceWidth}}
rowHeightHeight of each resource row in pixels. Rows with overlapping bookings grow to fit them.{{components.schedule1.rowHeight}}
showNowLineDraws a line at the current time.{{components.schedule1.showNowLine}}
highlightSelectedMarks the booking or slot the user clicked last.{{components.schedule1.highlightSelected}}
emptyTextMessage shown when there are no resources.{{components.schedule1.emptyText}}
statusColorsA color for each status word, for example { "on site": "#0ea5e9" }. Overrides the automatic tone.{{components.schedule1.statusColors}}
loadingIndicatorWhat shows while the schedule is loading: a spinner or a skeleton outline.{{components.schedule1.loadingIndicator}}
selectedBookingThe data row of the booking the user clicked last.{{components.schedule1.selectedBooking}}
selectedBookingIdThe id of the clicked booking, from Id field.{{components.schedule1.selectedBookingId}}
selectedSlotThe slot the user clicked last: resourceId, resource, start, end, date, startTime, endTime and a readable label.{{components.schedule1.selectedSlot}}
isVisibleWhether the component is visible.{{components.schedule1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.schedule1.isLoading}}
isDisabledWhether the component is disabled.{{components.schedule1.isDisabled}}

Styles​

Style
Default
BackgroundTheme: Surface 1
Grid line colorTheme: Default border
Label colorTheme: Placeholder text
Booking accent (bookings without a status, the selection)Theme: Brand primary
Current time line colorTheme: Error
Radius—
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.