The Calendar Input component for Retool Apps
An input field to select a specific date on a calendar.
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.
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
firstDayOfWeek
The first day of the week, by index, with Sunday as 0
.
Type | string | ||||||||||||||||
Mutability |
| ||||||||||||||||
Allowed Values |
|
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
query1
button1
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
labelPosition
The position of the label relative to the input field or value.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
top
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
4px 8px
readOnly
Whether user input is read-only.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
required
Whether a value is required to be selected.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
style
Custom style options.
Type | object | ||||
Mutability |
|
tooltipText
The tooltip text to display next to the label on hover.
Type | string | ||||
Format | Markdown | ||||
Mutability |
| ||||
Default |
|
Examples
Submit
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
calendarInput.clearValue()
Clear the current values.
calendarInput.clearValue()
Examples
Clear the current value of calendarInput
.
calendarInput.clearValue();
calendarInput.focus()
Set focus on the input field.
calendarInput.focus()
Examples
Set focus on calendarInput
.
calendarInput.focus();
calendarInput.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
calendarInput.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 calendarInput
into view.
calendarInput.scrollIntoView({behavior: 'auto', block: 'nearest'});
calendarInput.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
calendarInput.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable calendarInput
.
calendarInput.setDisabled(true);
Enable calendarInput
.
calendarInput.setDisabled(false);
calendarInput.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
calendarInput.setHidden(hidden)
Parameters
Examples
true
Examples
Hide calendarInput
.
calendarInput.setHidden(true);
Unhide calendarInput
.
calendarInput.setHidden(false);
calendarInput.setValue()
Set the current value.
calendarInput.setValue(value)
Examples
Set the current value of calendarInput
to userValue
.
calendarInput.setValue(userValue);
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 | The value is changed. |
s