BlogPlaygroundOne

VDatePicker API


Props
name
type
default
unknown[] | ((date: unknown) => boolean)
undefined

Restricts which dates can be selected.

number[] | ((date: number) => boolean)
undefined

Restricts which months can be selected.

number[] | ((date: number) => boolean)
undefined

Restricts which years can be selected.

string
undefined

Applies specified color to the control’s background. Used on components that also support the color prop. - supports utility colors with or without bg- prefix (for example success, purple or bg-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

string | number | boolean
false

Applies utility border classes to the component. To use it, you need to omit the border- prefix, (for example use border-sm as border="sm"). Find a list of the built-in border classes on the borders page.

string
undefined

Applies specified color to the control - supports utility colors with or without text- prefix (for example success, purple or text-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

string | number
undefined

Sets the height of the controls.

'docked' | 'modal'
'docked'
  • docked: Separate control groups for month and year.
  • modal: Month and year are displayed together, clicking the text opens a month picker, clicking the dropdown arrow opens a year picker. There are also arrow buttons to scroll between months.
boolean
null

Removes the ability to click or target the component.

boolean
false

Adds a divider between the header and controls.

string | number
undefined

Designates an elevation applied to the component between 0 and 5. You can find more information on the elevation page.

  | string
  | boolean
  | string[]
  | Record<string, string | boolean | string[]>
  | ((date: string) => string | boolean | string[])
null

Sets the color for event dots. It can be string (all events will have the same color) or object where attribute is the event date and value is boolean/color/array of colors for specified date or function taking date as a parameter and returning boolean/color/array of colors for that date.

  | string[]
  | ((date: string) => string | boolean | string[])
  | Record<string, string | boolean | string[]>
null

Array of dates or object defining events or colors or function returning boolean/color/array of colors.

string | number
undefined

Sets the first day of the week, starting with 0 for Sunday. (Note: not guaranteed to work when using custom date adapters.)

string | number
undefined

Sets the day that determines the first week of the year, starting with 0 for Sunday. For ISO 8601 this should be 4. (Note: not guaranteed to work when using custom date adapters.)

string
'$vuetify.datePicker.header'

Text shown when no display-date is set.

string
undefined

Allows you to set a different color for the header when used in conjunction with the color prop.

string
'normalDateWithWeekday'

Allows you to customize the format of the date selection text that appears in the header of the calendar.

string | number
undefined

Sets the height for the component.

boolean
false

Hides the header.

boolean
false

Hide the picker title.

boolean
false

Hides the weekdays.

boolean
false

Changes the picker to landscape mode.

string | number
undefined

Sets header width when in landscape mode.

Anchor
undefined

Specifies the component’s location. Can combine by using a space separated string.

unknown
undefined

Maximum allowed date/month (ISO 8601 format).

string | number
undefined

Sets the maximum height for the component.

string | number
undefined

Sets the maximum width for the component.

unknown
undefined

Minimum allowed date/month (ISO 8601 format).

string | number
undefined

Sets the minimum height for the component.

string | number
undefined

Sets the minimum width for the component.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$subgroup'

Icon displayed next to the current month and year, toggles year selection when clicked.

unknown
undefined

The v-model value of the component. If component supports the multiple prop, this defaults to an empty array.

string | number
undefined

Sets the month.

number | boolean | (string & {}) | 'range'
false

Allow the selection of multiple dates. The range value selects all dates between two selections.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$next'

Sets the icon for next month/year button.

boolean
false

Only applies to controlVariant="modal", the month and year picker buttons are combined into one that only opens the year picker.

'fixed' | 'static' | 'relative' | 'absolute' | 'sticky'
undefined

Sets the position for the component.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
'$prev'

Sets the icon for previous month/year button.

boolean
false

Makes the picker readonly (doesn’t allow to select new date).

string
'picker-reverse-transition'

The transition used when changing months into the past

string | number | boolean
undefined

Designates the border-radius applied to the component. This can be 0, xs, sm, true, lg, xl, pill, circle, and shaped. Find more information on available border radius classes on the Border Radius page.

boolean
false

Toggles visibility of days from previous and next months.

boolean
false

Toggles visibility of the week numbers in the body of the calendar.

string | (new () => any) | FunctionalComponent
'div'

Specify a custom tag used on the root element.

string
undefined

Specify content text for the component.

string
undefined

Specify a theme for this component and all of its children.

boolean
false

Removes any applied border-radius from the component.

string
'$vuetify.datePicker.title'

Specify a title text for the component.

string
'picker-transition'

The transition used when changing months into the future

'month' | 'year' | 'months'
'month'

Determines which picker in the date or month picker is being displayed. Allowed values: 'month', 'months', 'year'.

'long' | 'short' | 'narrow'
undefined

Allows you to customize the format of the weekday string that appears in the body of the calendar. Uses 'narrow' by default. (Note: not guaranteed to work when using custom date adapters.)

(0 | 1 | 2 | 4 | 5 | 6 | 3)[]
[0, 1, 2, 3, 4, 5, 6]

An array of weekdays to display. Does not affect the order.

'static' | 'dynamic'
'static'

A dynamic number of weeks in a month will grow and shrink depending on how many days are in the month. A static number always shows 7 weeks.

string | number
undefined

Width of the picker.

number
undefined

Sets the year.

Events
name
type
[unknown]

Event that is emitted when the component’s model changes.

[any]

Emitted when the month changes.

[any]

Emitted when the view mode changes.

[any]

Emitted when the year changes.

Slots
never
never
{ viewMode: 'month' | 'year' | 'months' monthYearText: string monthText: string yearText: string disabled: string[] openMonths: () => void openYears: () => void prevMonth: () => void nextMonth: () => void prevYear: () => void nextYear: () => void }
{ props: { onClick: () => void }; item: any; i: number }
{ header: string; transition: string }
{ month: { text: string; value: number } i: number props: { onClick: () => void } }
never
never
{ year: { text: string; value: number } i: number props: { active: boolean color: string rounded: boolean text: string variant: 'text' | 'flat' onClick: () => void } }

Slot for the actions.

Adds an item inside the input and after input content.

Slot for the controls.

Slot for a day in the month.

Slot for the header.

Slot for the month.

Adds an item outside the input and before input content.

Slot for the component’s title content.

Slot for the year.

SASS Variables