Skip to main content

The Date Time Picker component for Retool Mobile

An input field to select or enter a date and time.

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
ControlUsage
Retool UI Inspector > Interaction > Disabled
MethodsetDisabled()
Default
false
Examples
true

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
Mutability
ControlUsage
Retool UI Inspector

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Hidden
MethodsetHidden()
Default
false
Examples
true

label

The text label to display.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Add-ons > Label > Label
Default
null
Examples
"Label"

labelCaption

The additional text to display with the label.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Add-ons > Label > Caption

manageTimeZone

Whether to adjust the value and display value of time zones using valueTimeZone and displayTimeZone respectively.

Type unknown
Mutability
ControlUsage
Retool UI Inspector

mode

How to render images to fit.

Type string
Mutability
ControlUsage
Retool UI Inspector
MethodsetMode()
Allowed Values
ValueDescription
cover

Scale the image to fit the area while preserving the aspect ratio.

center

Center the image.

stretch

Resize the image to the same dimensions as the area.

contain

Scale and clip the image to fit the area while preserving the aspect ratio.


placeholder

The text to display within the input field when there is no value.

Type string
Formatstring
Mutability
ControlUsage
Retool UI Inspector > Content > Placeholder
Default
Enter a value
Examples
Enter a value

timeZoneValue

The time zone (UTC offset) to encode in value. Select local to use the time zone reported by the user's browser.

Type unknown
Mutability
ControlUsage
Retool UI Inspector

value

The current or default value.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Default value
MethodsetValue()
Default
null
Examples
Hello world!

Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

dateTimePicker.clearValidation()

Clear the validation message from the input field.

Definition
dateTimePicker.clearValidation()
Examples

Clear the validation message from dateTimePicker.

dateTimePicker.clearValidation();

dateTimePicker.clearValue()

Clear the current values.

Definition
dateTimePicker.clearValue()
Examples

Clear the current value of dateTimePicker.

dateTimePicker.clearValue();

dateTimePicker.focus()

Set focus on the input field.

Definition
dateTimePicker.focus()
Examples

Set focus on dateTimePicker.

dateTimePicker.focus();

dateTimePicker.resetValue()

Reset the current value to the default value.

Definition
dateTimePicker.resetValue()
Examples

Reset the current value of dateTimePicker.

dateTimePicker.resetValue();

dateTimePicker.setDisabled()

Set the disabled value to toggle whether the input field is disabled. Defaults to true without a parameter.

Definition
dateTimePicker.setDisabled(disabled)
Parameters

disabled

Whether input, interaction, selection, or triggering is disabled.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Disable dateTimePicker.

dateTimePicker.setDisabled(true);

Enable dateTimePicker.

dateTimePicker.setDisabled(false);

dateTimePicker.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
dateTimePicker.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide dateTimePicker.

dateTimePicker.setHidden(true);

Unhide dateTimePicker.

dateTimePicker.setHidden(false);

dateTimePicker.setValue()

Sets the value of the date picker.

Definition
dateTimePicker.setValue(value)
Parameters

value

The value.

Type string | number | boolean | object | array

Examples

Set the current value of dateTimePicker to userValue.

dateTimePicker.setValue(userValue);

dateTimePicker.validate()

Validates the value of the input field.

Definition
dateTimePicker.validate()
Examples

Validate the value of dateTimePicker.

dateTimePicker.validate();

Events

Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.

EventDescription
ChangeThe value is changed.