The Calendar component for Retool Apps
A content area to display calendar events.
Calendar uses the FullCalendar library.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
changeSet
Edited values for each row.
Type | array |
Format | Custom data |
Array values | object |
Configurability | Read-only |
Default | null |
colorByIndex
A list of colors for each item, by index.
Type | array |
Array values | string |
Configurability | Read-only |
Default | null |
data
The data.
Type | string | number | boolean | object | array |
Format | Custom data |
Configurability | Inspector |
Default | null |
dayMaxEvents
The maximum number of events to display, per day, when viewType
is month
. If not set, events stack to the height of the cell.
Type | number |
Configurability | Inspector |
Default | null |
displayAllDaySlot
Whether to display the all-day event slot.
Type | boolean |
Configurability | Inspector |
Default | null |
displayTimeZone
The time zone (UTC offset) that applies to the display value. Uses the time zone reported by the browser if set to local
.
Type | string |
Configurability | Inspector |
Default | null |
endByIndex
A list of end times, by index.
Type | array |
Array values | string |
Configurability | Read-only |
Default | null |
eventIdByIndex
A list of event IDs, by index.
Type | array |
Array values | string |
Configurability | Read-only |
Default | null |
eventMaxStack
The maximum number of events to display in a stack.
Type | number |
Configurability | Inspector |
Default | null |
events
A list of configured event handlers that trigger actions or queries.
Type | array |
Array values | object |
Configurability | Inspector > Interaction > Event handlers |
Default | null |
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Event |
Default | null |
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Run script actions |
Default | null |
type
The type of action to perform.
Type | string | ||||||||||||||
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Action | ||||||||||||||
Allowed Values |
| ||||||||||||||
Default | null |
firstDayOfWeek
The first day of the week, by index, with Sunday as 0
.
Type | string | ||||||||||||||||
Configurability | Inspector | ||||||||||||||||
Allowed Values |
| ||||||||||||||||
Default | null |
groupIdByIndex
A list of group IDs for each item, by index.
Type | array |
Array values | number |
Configurability | Read-only |
Default | null |
hidden
Whether this object is hidden from view.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Hidden |
Default | false |
Examples
true
id
The unique identifier (name).
Type | string |
Format | Plain Text |
Configurability | Inspector |
Default | calendar1 |
Examples
query1
button1
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Show on desktop |
Default | false |
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Show on mobile |
Default | true |
Examples
true
itemMode
The configuration mode for options.
Type | string | |||||||||
Configurability | Inspector > Content > Options | |||||||||
Allowed Values |
| |||||||||
Default | dynamic |
Examples
"dynamic"
listType
The date range to display in list view.
Type | string | ||||||||||
Configurability | Read-only | ||||||||||
Allowed Values |
| ||||||||||
Default | null |
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Maintain space when hidden |
Default | false |
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Configurability | Inspector > Spacing > Margin | |||||||||
Allowed Values |
| |||||||||
Default | 4px 8px |
Examples
4px 8px
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Always show in edit mode |
Default | false |
Examples
true
startByIndex
A list of start times, by index.
Type | array |
Array values | string |
Configurability | Read-only |
Default | null |
titleByIndex
A list of item titles, by index.
Type | array |
Array values | string |
Configurability | Read-only |
Default | null |
view
The view.
Type | string | ||||||||||||
Configurability | Read-only | ||||||||||||
Allowed Values |
| ||||||||||||
Default | null |
viewType
The type of view to display.
Type | string | ||||||||
Configurability | Inspector | ||||||||
Allowed Values |
| ||||||||
Default | null |
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
calendar.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
calendar.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring calendar
into view.
calendar.scrollIntoView({behavior: 'auto', block: 'nearest'});
calendar.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
calendar.setHidden(hidden)
Parameters
Examples
true
Examples
Hide calendar
.
calendar.setHidden(true);
Unhide calendar
.
calendar.setHidden(false);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Change Event | An event is changed. |
Click Event | An event is clicked or pressed. |
Create Event | An event is created. |
Remove Event | An event is removed. |