label | string · requiredLabel text. |
|---|
isLabelHidden | boolean · default falseVisually hide the label. |
|---|
description | stringHelper text displayed below the label. |
|---|
isOptional | boolean · default falseShow an "(optional)" indicator next to the label. |
|---|
isRequired | boolean · default falseMark the field as required. |
|---|
isDisabled | boolean · default falseDisable the input and calendar. |
|---|
disabledMessage | stringExplains why the input is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the field focusable via aria-disabled (activation stays blocked). Use this instead of wrapping a disabled DateInput in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
value | ISODateStringSelected date in YYYY-MM-DD format. |
|---|
onChange | (value: ISODateString | undefined) => voidCallback invoked when the selected date changes. |
|---|
changeAction | (value: ISODateString | undefined) => void | Promise<void>Async action fired after onChange. Drives optimistic UI updates via useTransition. |
|---|
isLoading | boolean · default falseWhether the input is in a loading state. Disables interaction and shows a spinner. |
|---|
min | ISODateStringMinimum selectable date (YYYY-MM-DD). |
|---|
max | ISODateStringMaximum selectable date (YYYY-MM-DD). |
|---|
dateConstraints | Array<(date: Date) => boolean>Array of custom constraint functions that disable specific dates. |
|---|
placeholder | string · default 'Select a date'Placeholder text shown in the text input. |
|---|
size | 'sm' | 'md' | 'lg' · default 'md'Size of the input control. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string}Status indicator object for error, warning, or success states with a message. |
|---|
statusVariant | 'attached' | 'detached' | 'tooltip' · default 'attached'How the status message is placed relative to the input. attached overlaps directly below the input (bordered treatment); detached floats below as a separate element with spacing; tooltip hides the message box and surfaces it in a tooltip on the status icon. |
|---|
labelTooltip | stringTooltip text displayed via an info icon at the end of the label. |
|---|
hasClear | boolean · default falseShows a clear (×) button when a date value is set. Clicking it clears the value and returns focus to the input. |
|---|
numberOfMonths | 1 | 2 · default 1Number of months displayed simultaneously in the calendar popover. |
|---|
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' · default 0First day of week in the calendar popover. A number (0 = Sunday to 6 = Saturday) or a three-letter day name. |
|---|
format | 'date' | 'date_long' | 'date_weekday' | 'system_date' | ((value: ISODateString) => string) · default 'date_long'How the committed date value is displayed. Named values are reused from Timestamp's format vocabulary: 'date' shows 'Mar 21, 2026', 'date_long' shows 'March 21, 2026', 'date_weekday' shows 'Wed, Mar 21, 2026', 'system_date' shows '2026-03-21'. A function receives the ISO value and returns a custom string. Applies only to the committed value, never to text being typed. |
|---|
presentation | 'popover' | 'bottom-sheet' | 'native' | 'adaptive-bottom-sheet' | 'adaptive-native' · default 'adaptive-native'Which surface draws the date picker. 'adaptive-native' (the default) uses Astryx's calendar popover on a fine pointer and the browser/OS picker (input type=date) on a coarse pointer, keeping Astryx fallbacks where a native control cannot express the value; 'native' always uses the browser/OS picker with no fallback; 'adaptive-bottom-sheet' uses the popover on a fine pointer and Astryx's bottom-sheet picker on a coarse pointer; 'popover' and 'bottom-sheet' force that Astryx surface on every pointer. Every value opens a picker; a typed-only field is TimeInput's alone. Use a non-native presentation for a field that needs weekStartsOn, numberOfMonths or dateConstraints, none of which a native picker can express. |
|---|
nativePicker | 'touch' | 'always' | 'never' · default 'touch'Deprecated: use presentation ('touch' = 'adaptive-native', 'always' = 'native', 'never' = 'adaptive-bottom-sheet'). Still works exactly as released; presentation wins when both are set. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}. |
|---|