AnyLumino
API referenceastryxinputs

DateTimeInput

Render an Astryx date-time input.

Astryx Props

JSON-safe DateTimeInput props forwarded to Astryx.

Supported Astryx props include:

  • label (string; required): Label text.
  • isLabelHidden (boolean): Visually hide the label.
  • description (string): Helper text displayed below the label.
  • isOptional (boolean): Show an "(optional)" indicator next to the label.
  • isRequired (boolean): Mark the field as required.
  • isDisabled (boolean): Disable the input and picker.
  • value (ISODateTimeString): Selected datetime in ISO 8601 format (YYYY-MM-DDTHH:MM or YYYY-MM-DDTHH:MM:SS).
  • onChange ((value: ISODateTimeString or undefined) => void; required): Callback invoked when the selected datetime changes.
  • changeAction ((value: ISODateTimeString or undefined) => void or Promise<void>): Async action fired after onChange. Drives optimistic UI updates via useTransition.
  • isLoading (boolean): Whether the input is in a loading state. Disables interaction and shows a spinner.
  • min (ISODateTimeString): Minimum selectable datetime. Constrains both date and time selection.
  • max (ISODateTimeString): Maximum selectable datetime. Constrains both date and time selection.
  • dateConstraints (Array<(date: Date) => boolean>): Array of custom constraint functions that disable specific dates.
  • hasSeconds (boolean): Include seconds in the time portion.
  • hourFormat ('12h' or '24h'): Hour display format. '12h' shows AM/PM; '24h' uses 24-hour notation.
  • timeIncrement (number): Minutes to add or subtract when using arrow keys in the time input.
  • hasClear (boolean): Shows a clear button when a datetime value is set.
  • placeholder (string): Placeholder text shown in the date portion when no date is selected.
  • timePlaceholder (string): Placeholder text shown in the time portion when no time is selected.
  • timeLabel (string): Accessible label for the time portion. Defaults to "{label} time" so it is tied to the field label and localizable.
  • size ('sm' or 'md' or 'lg'): Size of the input control.
  • status (InputStatus): Status indicator object for error, warning, or success states with a message.
  • labelTooltip (string): Tooltip text displayed via an info icon at the end of the label.
  • numberOfMonths (1 or 2): Number of months displayed simultaneously in the calendar.
  • xstyle (StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.

Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.

See Astryx component docs: https://astryx.atmeta.com/components/DateTimeInput.

Functions

constructor__init__(value=None, *, label='', disabled=False, min=None, max=None, seconds=None, hour_format=None, time_increment=None, clear=None, number_of_months=None, **props) -> None
paramvaluestr | None
= None

Synchronized component value.

paramlabelstr
= ''

Visible or accessible label for the component.

paramdisabledbool
= False

Whether the input is disabled.

paramminstr | None
= None

Minimum ISO datetime.

parammaxstr | None
= None

Maximum ISO datetime.

paramsecondsbool | None
= None

Whether to include seconds.

paramhour_formatstr | None
= None

Twelve- or twenty-four-hour display format.

paramtime_incrementint | None
= None

Arrow-key minute increment.

paramclearbool | None
= None

Whether to show a clear button.

paramnumber_of_monthsint | None
= None

Number of calendar months to display.

parampropsAny
= {}

Returns

None

On this page