Skip to content

API Reference

Props

PropTypeDefaultDescription
v-modelStringnullThe selected date (two-way data binding).
displayFormatString'yyyy-MM-dd'The format used to display the date.
disabledBooleanfalseDisables the date picker.
placeholderStringnullPlaceholder text for the input.
yearContentStringnullContent to display for the year.
yearFirstBooleanfalseDisplay year before the month in the date picker.
monthsArrayFull list of monthsArray of month names.
weekdaysArrayFull list of weekdaysArray of weekday names.
startWeekOnSundayBooleanfalseDetermines if the week starts on Sunday.
isDateDisabledFunctionnullFunction to disable specific dates.

Events

  • @update:modelValue: Triggered when the selected date changes.

Example:

vue
<DatePick @update:modelValue="handleDateChange" />

Methods

focus()

Focuses the date picker component programmatically.

Example:

vue
<DatePick ref="datepicker" />
<script setup>
const datepicker = ref(null)
datepicker.value.focus()
</script>