datetime-input
Overview
datetime-input allows users to input a datetime value using a calendar and time picker.
Basic Example
<var name="my_datetime" type="datetime" />
<datetime-input label="Please specify a date and time:" bind="my_datetime" required="false" />
Standard Attributes
bind
bindbindlabel
labellabelrequired
requiredrequiredAdvanced Attributes
align-content
align-contentalign-contentalign-label
align-labelalign-labelclear-button-visibility
clear-button-visibilityclear-button-visibilityclear-icon
clear-iconOptional
Type: string
Default: "fa-times"
Specify the icon on the right side of the input that appears when a date or time was selected. Find a list of available icons here.
date-placeholder
date-placeholderOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: "Select date"
Override the default placeholder text for the date input field.
Note: once the user entered a date the placeholder is no longer visible.

disabled
disableddisablederror-message
error-messageerror-messageicon-position
icon-positionicon-positionid
ididlabel-case
label-caselabel-casemodifier-text
modifier-textmodifier-texton-change
on-changeon-changeplaceholder-date
placeholder-dateDeprecated
placeholder-date is deprecated since version 4.87.0 of the JourneyApps Runtime.
Deprecated. See date-placeholder.
placeholder-time
placeholder-timeDeprecated
placeholder-time is deprecated since version 4.87.0 of the JourneyApps Runtime.
Deprecated. See time-placeholder.
show-if and hide-if
show-ifhide-ifshow-if and hide-iftime-format
time-formatOptional
Type: 12h | 24h
Default: 12h
Specify the clock format when users enter a time. Example:
12hformat: 3:32 PM24hformat: 15:32
time-icon
time-iconOptional
Type: string
Default: "fa-clock"
Specify the icon on the right side of the time input that appears before a time was selected. Find a list of available icons here.
time-placeholder
time-placeholderOptional
Type: string (static text, a format string or the return value of a JS/TS function)
Default: "Select time"
Override the default placeholder text for the date input field.
Note: once the user entered a time the placeholder is no longer visible.

Component Methods
The following component methods are available when an id is assigned to the component and component.datetimeInput({id:'my-id'}) is called from JS/TS:
clear
clearProgrammatically clear the selected date and time bound to the datetime-input component.
pickDate
pickDateProgrammatically open the date picker to allow the user to select or update a date value.
scrollIntoView
scrollIntoViewProgrammatically scroll until the datetime-input is visible in the view.
Last updated
