Skip to content

DateRangePicker

WxDateRangePicker picks a period. Two months are shown side by side, so a range that crosses a month boundary takes one pass instead of two.

Two months at once

Model: ["2026-03-02","2026-04-08"]

Three months, bounded
Disabled

Usage

vue
<script setup lang="ts">
import { ref } from 'vue'

const period = ref<string[] | null>(null)
</script>

<template>
  <wx-date-range-picker v-model="period" />
</template>

The model is [start, end] in yyyy-MM-dd, or null while nothing is picked — the same convention as DatePicker, so a period goes to a Laravel API without conversion.

A range of days, not of moments: there is no clock under the calendar, because the date-only format would throw away whatever was set on it. Where the ends really are moments, use two WxDateTimePickers.

vue
<template>
  <!-- three months, bounded to one year -->
  <wx-date-range-picker v-model="quarter" :months="3" min-date="2026-01-01" max-date="2026-12-31" />

  <!-- Date objects instead of strings -->
  <wx-date-range-picker v-model="dates" value-format="date" />
</template>

Props

PropTypeDefaultDescription
modelValuestring[] | Date[] | nullnull[start, end]
monthsnumber2Months shown side by side
valueFormatstringyyyy-MM-ddFormat each end is stored in; 'date' keeps Date
formatstringdd.MM.yyyyFormat the field shows
minDatestring | DateEarliest selectable date
maxDatestring | DateLatest selectable date
localestring | Localethe browserLanguage of the calendar
weekStartnumber10 is Sunday, 1 is Monday
clearablebooleantrueShow the clear button
autoApplybooleantrueApply on the second pick
textInputbooleanfalseAllow typing the range
teleportbooleantrueRender the calendar in a portal
size'sm' | 'md' | 'lg''md'Control height
status'default' | 'success' | 'warning' | 'error''default'Validation state
disabledbooleanfalseDisables the field
readonlybooleanfalseRead-only field
placeholderstringPlaceholder text
idstringgeneratedOverrides the id the label points at; WxFormItem supplies one
namestringname of the underlying input
ariaLabelstringLabel when there is no visible one

Events: update:modelValue, change, clear, open, close.

The calendar is drawn in the browser’s language unless told otherwise, the same way and with the same application-wide setting as DatePicker. Anything else the underlying picker accepts falls through as an attribute — see DatePicker.

Released under the MIT License.