Date Time Input
@astryxdesign/core v0.7.1 · DateTimeInput
DateTimeInput Props
| Name | Type | Default | Description |
|---|---|---|---|
v-model | string | null | null | YYYY-MM-DDTHH:MM. Null until both parts exist. |
label | string | — | Required accessible name of the pair. |
placeholder | string | — | Placeholder for the date field. |
hourFormat | '12h' | '24h' | '12h' | Display format of the time. The model stays ISO. |
presentation | 'popover' | 'bottom-sheet' | 'native' | 'adaptive-bottom-sheet' | 'adaptive-native' | 'text-input' | — | How both halves open. bottom-sheet, and adaptive-bottom-sheet on a coarse pointer, use one bottom sheet with Date and Time tabs. text-input applies only to the time. Omitted means a popover on a fine pointer and the platform controls on a coarse pointer. An explicit value wins over nativePicker. |
isLabelHidden | boolean | false | Hides the label visually while keeping it accessible. labelHidden is the older name; either one hides it. |
containerClass | string | object | array | — | Class for the field container. Has no effect, and warns in development, inside InputGroup and in a horizontal-labels FormLayout. |
containerStyle | StyleValue | — | Inline style for the field container. Same targeting as containerClass. |
controlClass | string | object | array | — | Class for the bordered control box. A class written on the component lands here too. |
controlStyle | StyleValue | — | Inline style for the bordered control box. |
hasClear | boolean | false | Clears the date and the time together. |
min / max | string | — | ISO bounds for the time portion. |
size | 'sm' | 'md' | 'lg' | 'md' | Height of both fields. |
status | FieldStatusInput | — | Error, warning, or success for the pair. |
statusVariant | 'attached' | 'detached' | 'tooltip' | 'attached' | Where the status message sits. |
isDisabled | boolean | false | Disables both fields. |
disabledMessage | string | — | Explains why both fields are disabled. With isDisabled, the message shows in a tooltip on hover or keyboard focus and both halves stay focusable with aria-disabled. |
hasSeconds | boolean | false | Includes seconds in the time half. The model then uses YYYY-MM-DDTHH:MM:SS. The system time control cannot express seconds, so the Astryx time field is kept. |
timeIncrement | 1 | 5 | 10 | 15 | 30 | 1 | Minute step for the arrow keys in the time half. A non-default value keeps the Astryx time field. |
timeOptionInterval | 5 | 10 | 15 | 30 | 60 | — | Minute cadence of preset times. Setting it opens a list of times under the clock icon, trimmed to the min and max time of day, and keeps the Astryx time field even in native modes. |
timeLabel | string | Time / 时间 | Accessible name of the time half. |
timePlaceholder | string | Select a time | Placeholder of the time half when no time is set. |
dateConstraints | Array<(date: Date) => boolean> | — | On the date half, a day is disabled when any function returns false. |
numberOfMonths | 1 | 2 | — | Months shown side by side in the date calendar. |
weekStartsOn | 0-6 | 'sun' | 'mon' | ... | — | First day of the week in the date calendar. |
nativePicker | 'touch' | 'always' | 'never' | — | Older surface name, passed to both the date and the time. |
isLoading | boolean | false | Neither field can be edited. |
changeAction | (value) => void | Promise<void> | — | Runs once both the date and the time exist. A promise keeps the pair busy. Clearing runs it too. |
isOptional | boolean | — | Marks the label as optional. |
isRequired | boolean | — | Marks the pair required. |
labelTooltip | string | — | Hint shown from the info icon at the end of the label. |