Skip to main content

Calendar

Rocket 2.0

The Calendar component shows a month on the page for the user to pick one date, several dates or a date range. Markers can flag days with events, such as deliveries or leave.

Properties​

Property
Description
Expected Value
Selection modeWhat the user picks: one date (Single), several dates (Multiple) or a start and end date (Range).Single, Multiple, Range. Default: Single
Default value (YYYY-MM-DD, a list, or [start, end])Dates selected at the start: a date such as 2026-03-14, a list of dates for Multiple, or [start, end] for Range.Text
Month to show (date; default: the selection or today)Any date in the month to show first. When empty, the calendar opens on the selected date or today.Text
MarkersDays to mark with a dot, as dates or { date, label, color } objects. The label shows when the user hovers over the day.Array
Min dateThe earliest date the user can pick.Text
Max dateThe latest date the user can pick.Text
Disabled datesDates the user can't pick, such as holidays.Array
Disabled weekdays (0 = Sunday)Weekdays the user can't pick, as numbers from 0 (Sunday) to 6 (Saturday) or day names.Array
Week starts onThe day shown in the first column of each week.Sunday, Monday, Saturday. Default: Sunday
Number of monthsHow many months to show side by side, from 1 to 3.Number. Default: 1
Show outside daysShows the days of the previous and next month that fill the first and last weeks.On or off. Default: On
Always six weeksAlways shows six weeks, so the calendar keeps the same height from month to month.On or off. Default: Off
Full widthStretches the calendar to fill the component's width.On or off. Default: Off
Show borderDraws a border around the calendar.On or off. Default: On
Loading lookWhat shows while the component is loading: a Spinner or a grey Skeleton block.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 selectTriggers when the selected dates change, by a click or by the Select date or Clear action.
On month changedTriggers when the user moves to another month.

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
Select dateSelects Date and shows its month. In Range mode, End date sets the end of the range; in Multiple mode, the date is added to the selection. Dates the user couldn't pick are ignored.components.calendar1.selectDate("", "")
ClearClears the selected dates.components.calendar1.clear()
Set monthShows the month that contains Date, such as 2026-03 or 2026-03-14.components.calendar1.setMonth("")
Set visibilityShows the component when true, hides it when false.components.calendar1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.calendar1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.calendar1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
modeWhat the user picks: one date (Single), several dates (Multiple) or a start and end date (Range).{{components.calendar1.mode}}
defaultValueDates selected at the start: a date such as 2026-03-14, a list of dates for Multiple, or [start, end] for Range.{{components.calendar1.defaultValue}}
defaultMonthAny date in the month to show first. When empty, the calendar opens on the selected date or today.{{components.calendar1.defaultMonth}}
markersDays to mark with a dot, as dates or { date, label, color } objects. The label shows when the user hovers over the day.{{components.calendar1.markers}}
minDateThe earliest date the user can pick.{{components.calendar1.minDate}}
maxDateThe latest date the user can pick.{{components.calendar1.maxDate}}
disabledDatesDates the user can't pick, such as holidays.{{components.calendar1.disabledDates}}
disabledDaysWeekdays the user can't pick, as numbers from 0 (Sunday) to 6 (Saturday) or day names.{{components.calendar1.disabledDays}}
weekStartsOnThe day shown in the first column of each week.{{components.calendar1.weekStartsOn}}
numberOfMonthsHow many months to show side by side, from 1 to 3.{{components.calendar1.numberOfMonths}}
showOutsideDaysShows the days of the previous and next month that fill the first and last weeks.{{components.calendar1.showOutsideDays}}
fixedWeeksAlways shows six weeks, so the calendar keeps the same height from month to month.{{components.calendar1.fixedWeeks}}
fullWidthStretches the calendar to fill the component's width.{{components.calendar1.fullWidth}}
showBorderDraws a border around the calendar.{{components.calendar1.showBorder}}
loadingIndicatorWhat shows while the component is loading: a Spinner or a grey Skeleton block.{{components.calendar1.loadingIndicator}}
valueThe selection: a date in YYYY-MM-DD form, a list of dates in Multiple mode, or [start, end] in Range mode.{{components.calendar1.value}}
selectedDateThe selected date, or the first one in Multiple and Range modes.{{components.calendar1.selectedDate}}
selectedDatesList of all selected dates.{{components.calendar1.selectedDates}}
startDateStart of the range in Range mode.{{components.calendar1.startDate}}
endDateEnd of the range in Range mode.{{components.calendar1.endDate}}
visibleMonthThe first month on screen, in YYYY-MM form.{{components.calendar1.visibleMonth}}
visibleStartFirst day of the months on screen.{{components.calendar1.visibleStart}}
visibleEndLast day of the months on screen.{{components.calendar1.visibleEnd}}
isVisibleWhether the component is visible.{{components.calendar1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.calendar1.isLoading}}
isDisabledWhether the component is disabled.{{components.calendar1.isDisabled}}

Styles​

Style
Default
Backgroundtransparent
Border colorTheme: Default border
Day text colorTheme: Primary text
Month title colorTheme: Primary text
Weekday and outside day colorTheme: Placeholder text
Selected day backgroundTheme: Brand primary
Selected day text colorTheme: Surface 1
Range backgroundTheme: Surface 3
Today backgroundTheme: Surface 3
Day hover backgroundTheme: Surface 3
Marker dot colorTheme: Brand primary
Calendar radius—
Day size (px)—
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.