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 picker. |
|---|
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 DateTimeInput in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
value | ISODateTimeStringSelected datetime in ISO 8601 format (YYYY-MM-DDTHH:MM or YYYY-MM-DDTHH:MM:SS). |
|---|
onChange | (value: ISODateTimeString | undefined) => void · requiredCallback invoked when the selected datetime changes. |
|---|
changeAction | (value: ISODateTimeString | 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 | ISODateTimeStringMinimum selectable datetime. Constrains both date and time selection. |
|---|
max | ISODateTimeStringMaximum selectable datetime. Constrains both date and time selection. |
|---|
dateConstraints | Array<(date: Date) => boolean>Array of custom constraint functions that disable specific dates. |
|---|
hasSeconds | boolean · default falseInclude seconds in the time portion. Keeps Astryx's time field even when nativePicker selects native surfaces, because iOS has no seconds wheel. |
|---|
hourFormat | '12h' | '24h' · default '12h'Hour display format. '12h' shows AM/PM; '24h' uses 24-hour notation. |
|---|
timeIncrement | 1 | 5 | 10 | 15 | 30 · default 1Minute step for arrow keys in Astryx's typed time field. A non-default value keeps the Astryx time field in nativePicker modes because iOS treats native step as validation, not picker cadence. Ignored by the Astryx touch sheet, which uses wheels. |
|---|
timeOptionInterval | 5 | 10 | 15 | 30 | 60Minute cadence for the preset-time combobox on Astryx's fine-pointer time field. Setting it keeps that Astryx time field even in nativePicker modes because the OS picker has no equivalent preset list. The Astryx touch sheet uses wheels. |
|---|
hasClear | boolean · default falseShows a clear button when a datetime value is set. |
|---|
placeholder | string · default 'Select a date'Placeholder text shown in the date portion when no date is selected. |
|---|
timePlaceholder | string · default 'Select a time'Placeholder text shown in the time portion when no time is selected. On touch, this appears in the closed time segment before a time is chosen. |
|---|
timeLabel | stringAccessible label for the time portion. Defaults to "{label} time" so it is tied to the field label and localizable. |
|---|
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. |
|---|
labelTooltip | stringTooltip text displayed via an info icon at the end of the label. |
|---|
numberOfMonths | 1 | 2 · default 1Number of months displayed simultaneously in Astryx's pointer calendar popover. Ignored by native date controls and the mobile touch sheet, whose Date panel always shows one swipe-paged month at a time. |
|---|
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' · default 0First day of week in Astryx calendars. A number (0 = Sunday to 6 = Saturday) or a three-letter day name. Ignored by native date controls. |
|---|
presentation | 'popover' | 'bottom-sheet' | 'native' | 'adaptive-bottom-sheet' | 'adaptive-native' · default 'adaptive-native'Which surfaces draw the date and time pickers. 'adaptive-native' (the default) uses Astryx's typed fields and popovers on a fine pointer and browser/OS controls on a coarse pointer — with per-segment Astryx fallbacks: hasSeconds, non-default timeIncrement, or timeOptionInterval retain Astryx's time field because iOS cannot express them faithfully; 'native' always uses both browser/OS controls with no fallback; 'adaptive-bottom-sheet' uses popovers on a fine pointer and Astryx's coordinated bottom sheet on a coarse pointer; 'popover' and 'bottom-sheet' force that Astryx surface on every pointer. Every value opens pickers; typed-only fields are TimeInput's alone. Use a non-native presentation when numberOfMonths, weekStartsOn, or visible dateConstraints behavior matters. Constraints are enforced on commit; min/max are forwarded as hints. hourFormat formats the closed time, while the OS picker follows the user's locale. |
|---|
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={{}}. |
|---|