Date time input - Code
Basic
Disabled
Label
Readonly
Validation
Slots
Min- and max-date
Require confirmation
By default, date time inputs apply every pick immediately and Done closes the picker. Set requireConfirmation to only apply the value when users click Confirm. Cancel, Escape or clicking outside discards the pending selection. Date time inputs emit valueChange only for applied values. Valid values typed into the input field are always applied immediately and emit valueChange.
Display format
Set displayFormat to show and type the date and time in a different format than format.
value, minDate, maxDate and emitted values keep using format.
When users type a date, parts missing in displayFormat, like seconds, are kept from the current value.
A typed two-digit year resolves to the year closest to the current value.
API for ix-datetime-input
Properties
ARIA label for the calendar icon button
Will be set as aria-label on the nested HTML button element
aria-label-calendar-buttonstring | undefined'Toggle calendar'ARIA label for next month navigation button
aria-label-next-month-buttonstring | undefined'Next month'ARIA label for previous month navigation button
aria-label-previous-month-buttonstring | undefined'Previous month'Whether the input is disabled
disabledbooleanfalseLuxon date and time format used to display and type the value in the input field.
value, minDate, maxDate and emitted values keep using format,
e.g. format="yyyy/LL/dd HH:mm:ss" with displayFormat="yy/LL/dd HH:mm"
displays a two-digit year without losing the century of the value.
Date and time parts missing in displayFormat, like seconds, are kept
from the current value when the user types a date. A typed two-digit
year resolves to the year closest to the current value.
Defaults to format.
See https://moment.github.io/luxon/#/formatting?id=table-of-tokens for all available tokens.
display-formatstring | undefinedEnable Popover API rendering for dropdown.
enable-top-layerbooleanfalseLuxon date and time format of value, minDate, maxDate and emitted values
(e.g., 'yyyy/LL/dd HH:mm:ss' → "2026/01/20 13:07:04").
See https://moment.github.io/luxon/#/formatting?id=table-of-tokens for all available tokens.
formatstring'yyyy/LL/dd HH:mm:ss'Helper text displayed below the input
helper-textstring | undefinedText for cancel button in picker when requireConfirmation is enabled
i18n-cancelstring'Cancel'Text for confirm button in picker when requireConfirmation is enabled
i18n-confirmstring'Confirm'Text for done button in picker (prop name matches datetime-picker)
i-1-8n-donestring'Done'Error message when datetime cannot be parsed
i-1-8n-error-date-time-unparsablestring'Date time is not valid'Header text for time picker section
i-1-8n-timestring'Time'Informational message
info-textstring | undefinedValidation message for invalid state
invalid-textstring | undefinedLabel text displayed above the input
labelstring | undefinedLocale for date/time formatting (e.g., 'en-US', 'de-DE')
localestring | undefinedMaximum allowed date (matching format or date-only, e.g., "2026/12/31")
max-datestring | undefinedLatest selectable time (tokens matching the time portion of format). Invalid non-empty values are ignored.
max-timestring | undefinedMinimum allowed date (matching format or date-only, e.g., "2026/01/20")
min-datestring | undefinedEarliest selectable time (tokens matching the time portion of format). Invalid non-empty values are ignored.
min-timestring | undefinedName of the form control for form submission
namestring | undefinedPlaceholder text when input is empty
placeholderstring | undefinedWhether the input is read-only (calendar icon hidden)
readonlybooleanfalseIf true, a date and time picked in the dropdown are only applied after the
user confirms them with the confirm button. The cancel button, pressing
Escape or clicking outside the dropdown discards the pending selection.
require-confirmationbooleanfalseWhether the field is required
requiredbooleanfalseShow helper text as tooltip instead of below input
show-text-as-tooltipbooleanfalseShow week numbers in date picker
show-week-numbersbooleanfalsePrevent form submission when Enter is pressed
suppress-submit-on-enterbooleanfalseText alignment within the input field
text-alignment"end" | "start"'start'Success/valid message
valid-textstring | undefinedValue in format (e.g., "2026/01/21 13:07:04" for default format)
valuestring | undefined''Warning message
warning-textstring | undefinedFirst day of week (0=Sunday, 1=Monday, etc.)
week-start-indexnumber0Events
Emitted when the input loses focus
ixBlurvoidEmitted when the date/time value changes via user interaction.
Fires in two scenarios:
-
When the input loses focus (blur) and the value has changed
-
When the picker closes after the value was changed in it, or on
Confirm when
requireConfirmationis enabled
Does NOT fire when:
-
The picker is opened/closed without changing the value
-
The input is blurred without modifying the value
-
The value is changed programmatically via the value property
ixChangestring | undefinedEmitted when the input receives focus
ixFocusvoidEmitted when validation state changes
validityStateChangeDateTimeInputValidityStateEmitted when the datetime value changes. Payload is in format or undefined
valueChangestring | undefinedSlot
Element will be displayed at the end of the input
Element will be displayed at the start of the input