Skip to content

DatePicker

A text input that opens a Calendar popover when clicked. Displays the selected date as MMM D, YYYY. Includes a clear button when a value is selected.

Basic usage

Value: none

Tailwind v4
vue
<script setup>
import { ref } from 'vue'
const date = ref('')
</script>

<template>
  <DatePicker v-model="date" label="Select date" />
</template>

With a pre-selected value

Tailwind v4
vue
<DatePicker v-model="date" label="Due date" />

Min / max constraints

Tailwind v4
vue
<DatePicker
  v-model="date"
  label="Pick a June date"
  min-date="2026-06-01"
  max-date="2026-06-30"
/>

Disabled

Tailwind v4
vue
<DatePicker model-value="2026-06-10" label="Locked date" disabled />

Props

PropTypeDefaultDescription
modelValuestringSelected date in YYYY-MM-DD format
labelstringLabel rendered above the input
placeholderstring'Select a date'Placeholder text when no date is selected
disabledbooleanfalseDisables interaction
minDatestringEarliest selectable date (YYYY-MM-DD)
maxDatestringLatest selectable date (YYYY-MM-DD)

Emits

EventPayloadDescription
update:modelValuestringISO date string (YYYY-MM-DD) of the selected day, or '' when cleared

Private — Jetpack Labs internal use only