Form
DatePicker
A date field you can type into or pick from a calendar, read in the locale's format.
WAI-ARIA tested
Import
main.ts
import { DatePicker } from '@vitral/vue';Basic
Format from the locale · value: null
Constraints
Only the next 30 days, no weekends, and two blocked days. Unselectable days are skipped by the keys and cannot be clicked or typed.
Inline
The calendar on its own, without the field.
Pick-up dayValue: Sun Sep 27 2026
Disabled
Sizes, variants and states
Fluid
API
Read from packages/vue/src/components/DatePicker/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| dateFormat | string | A `formatDate` pattern (`yyyy yy MMMM MMM MM M dd d`); defaults to the locale's `dateFormat`. |
| minDate | Date | null | The earliest selectable day. |
| maxDate | Date | null | The latest selectable day. |
| disabledDates | Date[] | Days that cannot be chosen. |
| disabledDays | number[] | Weekdays that cannot be chosen, 0 = Sunday. |
| showTodayButton | boolean | A footer button that selects today. |
| showClearButton | boolean | A footer button that empties the value. |
| firstDayOfWeek | number | 0 = Sunday; defaults to the locale's `firstDayOfWeek`. |
| placeholder | string | — |
| inline | boolean | Show the calendar in place, without a text box or popup. |
| size | Size | — |
| variant | InputVariant | Defaults to the plugin's `inputVariant`. |
| invalid | boolean | — |
| disabled | boolean | — |
| readonly | boolean | — |
| fluid | boolean | — |
| placement | OverlayPlacement | — |
| appendTo | string | `'body'` (the default), `'self'` to render in place, or a selector. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| dateSelect | date: Date | A day was chosen in the calendar, or typed and committed. |
| clear | — | — |
| show | — | — |
| hide | — | — |
| monthChange | event: DatePickerMonthChangeEvent | — |
| focus | event: FocusEvent | — |
| blur | event: FocusEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| date | (props: DatePickerDateSlotProps) | The content of one day cell. |
| footer | — | Extra content in the calendar's footer. |
| dropdownicon | — | The calendar button's icon. |