Skip to content

DateRangePicker

Date range picker built on top of Calendar. Renders a trigger that opens a popover containing two independently navigable calendars — pick a month/year on each side freely.

Live Demo

Employment: 2020-01-01 → 2024-12-31
Project:

Usage

vue
<script setup>
import { ref } from "vue";
const dates = ref({ start: null, end: null });
</script>

<template>
  <orio-date-range-picker v-model="dates" label="Project Window" />
</template>

Selection behaviour

  • First click sets start, clears end.
  • Second click sets end. If the picked date is before start, the two are swapped.
  • A third click (when the range is complete) starts a fresh range.
  • Hovering after the first click previews the range across both calendars.

Props

Inherits all ControlProps (label, size, layout, error, ...).

PropTypeDefaultDescription
placeholderstringi18n stringTrigger text when nothing selected
minstring | nullnullISO YYYY-MM-DD lower bound
maxstring | nullnullISO YYYY-MM-DD upper bound
markersCalendarMarker[][]Highlight ranges — passed through to both calendars
getMarker(iso) => CalendarMarker | nullPer-day marker callback. The hover-preview range overrides this while picking
isDisabled(iso) => booleanExtra disabled predicate, combined with min / max

See Calendar for the CalendarMarker type and resolution rules.

v-model

DateRange{ start: string | null, end: string | null } with ISO date strings.

typescript
interface DateRange {
  start: string | null;
  end: string | null;
}

Events

EventPayloadDescription
update:modelValueDateRangeEmitted when range changes