AnyLumino
API referenceastryxinputs

DateInput

Render an Astryx date input.

Astryx Props

JSON-safe DateInput 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 calendar.
  • value (ISODateString): Selected date in YYYY-MM-DD format.
  • onChange ((value: ISODateString or undefined) => void): Callback invoked when the selected date changes.
  • changeAction ((value: ISODateString 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 (ISODateString): Minimum selectable date (YYYY-MM-DD).
  • max (ISODateString): Maximum selectable date (YYYY-MM-DD).
  • dateConstraints (Array<(date: Date) => boolean>): Array of custom constraint functions that disable specific dates.
  • placeholder (string): Placeholder text shown in the text input.
  • 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.
  • hasClear (boolean): Shows a clear (x) button when a date value is set. Clicking it clears the value and returns focus to the input.
  • numberOfMonths (1 or 2): Number of months displayed simultaneously in the calendar popover.
  • 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/DateInput.

Functions

constructor__init__(value=None, *, label='', disabled=False, min=None, max=None, placeholder=None, size=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 date.

parammaxstr | None
= None

Maximum ISO date.

paramplaceholderstr | None
= None

Placeholder text.

paramsizestr | None
= None

Input size.

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