Components
BaseDateRangeField
Two date fields for a start and an end, kept in order.
components/ui/inputs/BaseDateRangeField.vue
View in the demo
Example
API
Props
Name | Type | Default | Description |
|---|---|---|---|
min | string | — | The earliest selectable date (YYYY-MM-DD). |
max | string | — | The latest selectable date. |
min-aria-label | string | — | Accessible name of the start field. |
max-aria-label | string | — | Accessible name of the end field. |
label | string | — | The visible label above the field, linked to it with for and aria-labelledby. |
input-id | string | — | A fixed id for the input. One is generated with useId() when you leave it out. |
optional | boolean | — | Adds “(optional)” after the label. Never mark required fields. |
info | BaseInputInfo | — | A help popover next to the label: a text or a list of { title, text }. |
v-model | BaseDateRangeValue | null | null | [start, end] as YYYY-MM-DD strings, or null. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: BaseDateRangeValue | null] | — |
Accessibility
With a label the group renders a fieldset with a legend, so screen readers announce the question before each option. It accepts rules, hint and error-messages like any field.