Skip to content

Date Range Input

@astryxdesign/core v0.7.1 · DateRangeInput

DateRangeInput Props ​

NameTypeDefaultDescription
v-modelDateRange | nullnull{ start, end } ISO dates.
labelstring—Required accessible name.
presets{ label, getRange }[]—Shortcut buttons. getRange returns a range.
monthCountnumber2How many months the popover shows.
numberOfMonths1 | 2—Months side by side. This wins over monthCount.
dateConstraintsArray<(date: Date) => boolean>—A day is disabled when any function returns false.
min / maxstring—ISO dates that cannot be selected outside.
minRangeSpannumber1Shortest span in days, including both ends.
maxRangeSpannumber—Longest span in days, including both ends.
weekStartsOn0-6 | 'sun' | 'mon' | ...Sunday, Monday for zh-CNFirst column of the calendar.
hasClearbooleantrueShows a clear button. Keyboard activation returns focus to the trigger without scrolling the page.
isLabelHiddenbooleanfalseHides the label visually while keeping it accessible. labelHidden is the older name; either one hides it. Playground templates use is-label-hidden.
containerClassstring | object | array—Class for the field container. Has no effect, and warns in development, inside InputGroup and in a horizontal-labels FormLayout.
containerStyleStyleValue—Inline style for the field container. Same targeting as containerClass.
controlClassstring | object | array—Class for the bordered control box. A class written on the component lands here too, not on the trigger button.
controlStyleStyleValue—Inline style for the bordered control box.
placeholderstringSelect date rangeEmpty-state text. Follows the locale.
statusFieldStatusInput—Error, warning, or success.
statusVariant'attached' | 'detached' | 'tooltip''attached'Where the status message sits.
isDisabledbooleanfalseDisables the field.
disabledMessagestring—Explains why the field is disabled. With isDisabled, the message shows in a tooltip on hover or keyboard focus and the trigger stays focusable with aria-disabled; the calendar still cannot open.
isLoadingbooleanfalseThe field cannot be edited while a change is saving.
changeAction(value) => void | Promise<void>—Runs after the range is committed. A promise keeps the field busy.
isOptionalboolean—Marks the label as optional.
isRequiredboolean—Marks the field required.
labelTooltipstring—Hint shown from the info icon at the end of the label.