Date Range Picker
newCheck-in, check-out, and a calendar for the bit in between. Late checkout not included.
Pick the first day, then the last.
Open Props in the corner of the example to try variant, size and disabled.
Installation
It installs the Date Picker with it, whose trigger and panel it shares.
Usage
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
import type { DateRange } from 'reka-ui'
import { DateRangePicker } from '@/components/ui/date-range-picker'
const trip = shallowRef<DateRange | null>({
start: new CalendarDate(2026, 10, 23),
end: new CalendarDate(2026, 11, 2),
})
</script>
<template>
<DateRangePicker v-model="trip" :number-of-months="2" locale="en-US" aria-label="Trip" />
</template>
An InputDateRange with a calendar button, opening a RangeCalendar. Type both ends, or click the first day and then the last; the days between fill in as you go, and the calendar closes once there is an end.
v-model is { start, end }. While the end is being picked, end is undefined. Escape in the middle of a pick puts the last range back.
Two months side by side need about 560px. The demo above shows one on a phone, switching number-of-months with useMediaQuery; below sm the calendar stacks its months anyway.
Set name, and the form gets two fields, name[start] and name[end], each an ISO date and empty until that end is set. Reka UI's own range input would send "undefined - undefined" and never fail required, so the picker doesn't use it. required needs both ends.
Everything else, from locale to sizes and Field wiring, works as on the Date Picker.
Examples
Button trigger
A dashboard filter: a button showing the period, with presets beside the calendar. DateRangePickerValue joins the ends with formatRange, which writes what they share once: "Oct 6 – 12, 2026".
Form
Hotel nights in a plain form. maximum-days caps the stay once the check-in is picked, and a stay can't cross a sold-out night unless allow-non-contiguous-ranges is on.
Known limits
The same as the Date Picker's, and:
step-snappingisn't there for ranges: Reka UI's range field doesn't have it.- With two months, the days of a neighbouring month are hidden rather than muted: Reka marks them selected too, and the range would show twice (reka-ui#2730).
API Reference
DateRangePicker on its own renders the field and the calendar; put the parts in its default slot to change them. DateRangePickerTrigger and DateRangePickerContent are DatePickerTrigger and DatePickerContent under range names, so their API is below.
DateRangePicker
| Prop | Default | Type and description |
|---|---|---|
| defaultValue | undefined | DateRangeThe starting range when |
| defaultPlaceholder | — | DateValueThe month to open on while there is no start, and the date the empty segments step from. Its type decides the segments: a |
| placeholder | undefined | DateValueThe month the calendar shows, bound with |
| modelValue | undefined | DateRange | nullThe range, bound with |
| hourCycle | — | HourCycle
|
| step | — | DateStepHow far the arrow keys move each segment, as |
| granularity | — | GranularityThe last segment shown on each end: |
| hideTimeZone | — | booleanHides the time zone segments that |
| maxValue | — | DateValueThe latest date. Later days are disabled in the calendar, and a later typed date marks the field invalid. |
| minValue | — | DateValueThe earliest date. Earlier days are disabled in the calendar, and an earlier typed date marks the field invalid. |
| locale | — | stringThe locale for the segment order, the month names and the week start. Defaults to the one Reka UI's |
| disabled | — | booleanDisables the segments, the trigger and the calendar. Also set by a disabled field. |
| readonly | — | booleanKeeps the segments focusable but not editable. The calendar still opens, but its days can't be picked. |
| isDateUnavailable | — | MatcherReturns |
| id | — | stringOverrides the |
| dir | — | DirectionThe reading direction, which also mirrors the calendar's arrow keys. Defaults to the one Reka UI's |
| name | — | stringSubmits the range with the form as two fields, |
| required | — | booleanMarks both hidden form inputs required, so the form needs both ends. Also set by a required field. |
| defaultOpen | false | booleanWhether it starts open when |
| open | undefined | booleanWhether the calendar is open, bound with |
| modal | false | booleanShuts the page while the calendar is open: a scrim takes the first outside click, which only closes it. |
| isDateDisabled | — | MatcherReturns |
| pagedNavigation | — | booleanMakes the calendar's arrows move by |
| weekStartsOn | — | WeekStartsOnThe first day of the week, from |
| weekdayFormat | — | WeekDayFormatHow the weekday headers are written: |
| fixedWeeks | true | booleanDraws six weeks in every month, so the panel keeps its height as you page. On by default. |
| numberOfMonths | — | numberHow many months the calendar shows side by side. Below |
| preventDeselect | — | booleanKeeps a click on the range's only day from clearing it. |
| isDateHighlightable | — | MatcherReturns |
| allowNonContiguousRanges | — | booleanLets a range run across unavailable days. |
| fixedDate | — | "start" | "end"Keeps the |
| maximumDays | — | numberThe longest range, in days. Once a start is picked, days beyond it are disabled. |
| closeOnSelect | undefined | booleanCloses the calendar once both ends are picked. Defaults to on for dates and off when there are time segments. |
| variant | — | "outline" | "soft" | "filled" | "ghost" | "subtle"The field's look, shared with |
| size | — | "xs" | "sm" | "md" | "lg" | "xl"The field's height and the calendar's size, from |
| Event | Payload and description |
|---|---|
| update:modelValue | [range: DateRange]Fires when a typed end completes or clears, and on each pick in the calendar, including the partial |
| update:placeholder | [date: DateValue]Fires when the calendar pages to another month. |
| update:startValue | [date: DateValue | undefined]Fires when a start is picked in the calendar, before there is an end. |
| update:open | [value: boolean]Fires when the calendar opens or closes. |
| focus | [event: FocusEvent]Fires once when focus enters the picker: the segments, the trigger and the calendar count as one control. |
| blur | [event: FocusEvent]Fires once when focus leaves the segments, the trigger and the calendar, not when it moves between them. |
| Slot | Scope and description |
|---|---|
| default | { modelValue: DateRange | null | undefined; open: boolean; }The parts, with |
DateRangePickerInput
| Prop | Default | Type and description |
|---|---|---|
| variant | — | "outline" | "soft" | "filled" | "ghost" | "subtle"The text control look, shared with |
| size | — | "xs" | "sm" | "md" | "lg" | "xl"The field's height, from 28px at |
| Slot | Scope and description |
|---|---|
| default | anyWhat follows the end's segments in the frame. |
DateRangePickerValue
| Prop | Default | Type and description |
|---|---|---|
| asChild | — | booleanRender the single child instead of a wrapper, merging the attributes onto it. |
| as | "span" | AsTag | ComponentThe element or component to render. A |
| placeholder | — | stringThe text shown while there is no start, muted through |
| format | — | Intl.DateTimeFormatOptions
|
| Slot | Scope and description |
|---|---|
| default | { value: DateRange | null | undefined; formatted: string | undefined; }The text, with |
DateRangePickerCalendar
| Prop | Default | Type and description |
|---|---|---|
| size | — | CalendarSizeSets the day cells, arrows and text from |
| color | — | CalendarColorThe tone of the range's ends, its band and today's outline: |
| weekNumbers | — | booleanAdds a column of week numbers before each row. Hidden from screen readers. |
| Slot | Scope and description |
|---|---|
| default | { date: DateValue; grid: Grid<DateValue>[]; weekDays: string[]; weekStartsOn: WeekStartsOn; locale: string; fixedWeeks: boolean; modelValue: DateRange; }Replaces the calendar's layout, with Reka's |
| heading | { headingValue: string; date: DateValue; setPlaceholder: (date: DateValue) => void; }The heading's content, with |
| week-day | { day: string; index: number; }A weekday header's content, with |
| day | { day: DateValue; dayValue: string; selected: boolean; today: boolean; disabled: boolean; unavailable: boolean; outsideView: boolean; outsideVisibleView: boolean; highlighted: boolean; highlightedStart: boolean; highlightedEnd: boolean; selectionStart: boolean; selectionEnd: boolean; }A day's content, with the day's state, including |
| prev-icon | anyThe Previous arrow's icon, a chevron by default. |
| next-icon | anyThe Next arrow's icon, a chevron by default. |
DatePickerTrigger
| Prop | Default | Type and description |
|---|---|---|
| asChild | — | booleanHands the trigger's behaviour to your own button, such as an outline |
| as | — | AsTag | ComponentThe element or component to render. A |
| Slot | Scope and description |
|---|---|
| default | anyThe icon, a calendar by default. With |
DatePickerContent
| Prop | Default | Type and description |
|---|---|---|
| forceMount | — | booleanKeeps the panel mounted while closed, for animating it with a JavaScript library. |
| memoDependencies | — | unknown[]Values that should re-run the position update when they change. |
| side | — | "top" | "right" | "bottom" | "left"The side of the field to open on. Flips to the other side when there is no room, unless |
| sideOffset | 4 | numberDistance in pixels from the field. |
| sideFlip | — | booleanFlips to the opposite side when the preferred one would overflow. |
| align | "start" | "start" | "center" | "end"Alignment against the field along the chosen side. |
| alignOffset | — | numberOffset in pixels from the |
| alignFlip | — | booleanFlips the alignment when it would overflow. |
| avoidCollisions | — | booleanKeeps the panel inside the collision boundary by flipping and shifting it. |
| collisionBoundary | — | Element | (Element | null)[] | nullThe element or elements used as the collision boundary. The viewport by default. |
| collisionPadding | 8 | number | Partial<Record<"top" | "right" | "bottom" | "left", number>>Distance in pixels from the boundary edges where collisions start. |
| arrowPadding | — | numberPadding between an arrow and the panel's corners. |
| hideShiftedArrow | — | booleanHides an arrow when the panel is shifted so far that the arrow would not point at the field. |
| sticky | — | "partial" | "always"
|
| hideWhenDetached | — | booleanHides the panel when the field is scrolled out of view. |
| positionStrategy | — | "absolute" | "fixed"The CSS position used to place the panel. |
| updatePositionStrategy | — | "always" | "optimized"
|
| disableUpdateOnLayoutShift | — | booleanStops recomputing the position when the layout shifts. |
| prioritizePosition | — | booleanKeeps the preferred side and alignment and lets the panel overflow instead of flipping. |
| reference | — | ReferenceElementA virtual element to position against instead of the field or the trigger. |
| dir | — | DirectionReading direction of the panel. Defaults to the picker's |
| asChild | — | booleanRender the single child instead of a wrapper, merging this part's attributes and classes onto it. |
| as | — | AsTag | ComponentThe element or component to render. |
| disableOutsidePointerEvents | — | booleanShuts the page to the pointer while open, as |
| Event | Payload and description |
|---|---|
| escapeKeyDown | [event: KeyboardEvent]Fires on Escape. Call |
| pointerDownOutside | [event: PointerDownOutsideEvent]Fires on a pointer press outside. Call |
| focusOutside | [event: FocusOutsideEvent]Fires when focus moves outside. Call |
| interactOutside | [event: PointerDownOutsideEvent | FocusOutsideEvent]Fires on any press or focus outside. Call |
| openAutoFocus | [event: Event]Fires before focus moves to the selected day, today or the first day you can pick. Call |
| closeAutoFocus | [event: Event]Fires when focus returns to the trigger on close. Call |
| Slot | Scope and description |
|---|---|
| default | anyThe calendar, and whatever goes with it: presets, a Done button, a note. |
Props
- defaultValue
undefined DateRangeThe starting range whenv-modelis not used.- defaultPlaceholder
DateValueThe month to open on while there is no start, and the date the empty segments step from. Its type decides the segments: aCalendarDateTimeadds time.- placeholder
undefined DateValueThe month the calendar shows, bound withv-model:placeholder. Left unbound, the calendar opens on the start, or today, every time.- modelValue
undefined DateRange | nullThe range, bound withv-model:{ start, end }of@internationalized/datevalues, ornull. While the end is being picked,endisundefined.- hourCycle
HourCycle12or24for the time segments. Defaults to the locale's cycle;12adds an AM/PM segment.- step
DateStepHow far the arrow keys move each segment, as{ year, month, day, hour, minute, second }.1by default.- granularity
GranularityThe last segment shown on each end:day,hour,minuteorsecond. Defaults todayfor aCalendarDateandminutefor a value with time.- hideTimeZone
booleanHides the time zone segments thatZonedDateTimevalues show.- maxValue
DateValueThe latest date. Later days are disabled in the calendar, and a later typed date marks the field invalid.- minValue
DateValueThe earliest date. Earlier days are disabled in the calendar, and an earlier typed date marks the field invalid.- locale
stringThe locale for the segment order, the month names and the week start. Defaults to the one Reka UI'sConfigProvidersets, which isenunless you set it.- disabled
booleanDisables the segments, the trigger and the calendar. Also set by a disabled field.- readonly
booleanKeeps the segments focusable but not editable. The calendar still opens, but its days can't be picked.- isDateUnavailable
MatcherReturnstruefor days struck through in the calendar, which a range can't cross unlessallowNonContiguousRangesis on. Swapping the function works.- id
stringOverrides theidtaken from a surrounding field. It lands on the start's hidden input, or on the trigger when it is a button.- dir
DirectionThe reading direction, which also mirrors the calendar's arrow keys. Defaults to the one Reka UI'sConfigProvidersets.- name
stringSubmits the range with the form as two fields,name[start]andname[end], each an ISO date and empty until that end is set.- required
booleanMarks both hidden form inputs required, so the form needs both ends. Also set by a required field.- defaultOpen
false booleanWhether it starts open whenv-model:openis not used.- open
undefined booleanWhether the calendar is open, bound withv-model:open.- modal
false booleanShuts the page while the calendar is open: a scrim takes the first outside click, which only closes it.- isDateDisabled
MatcherReturnstruefor days the calendar won't offer. Typed into the field, they mark it invalid. Swapping the function works.- pagedNavigation
booleanMakes the calendar's arrows move bynumberOfMonthsinstead of one month.- weekStartsOn
WeekStartsOnThe first day of the week, from0(Sunday) to6. Leave it out to follow the locale.- weekdayFormat
WeekDayFormatHow the weekday headers are written:narrow(the default),shortorlong.- fixedWeeks
true booleanDraws six weeks in every month, so the panel keeps its height as you page. On by default.- numberOfMonths
numberHow many months the calendar shows side by side. Belowsmthey stack. With more than one, the days outside each month are hidden, so the band shows once.- preventDeselect
booleanKeeps a click on the range's only day from clearing it.- isDateHighlightable
MatcherReturnstruefor unavailable days that the preview may still cross.- allowNonContiguousRanges
booleanLets a range run across unavailable days.- fixedDate
"start" | "end"Keeps thestartor theendin place while the other end is picked again.- maximumDays
numberThe longest range, in days. Once a start is picked, days beyond it are disabled.- closeOnSelect
undefined booleanCloses the calendar once both ends are picked. Defaults to on for dates and off when there are time segments.- variant
"outline" | "soft" | "filled" | "ghost" | "subtle"The field's look, shared withInput:outline,soft,filled,ghostorsubtle. AvariantonDateRangePickerInputwins.- size
"xs" | "sm" | "md" | "lg" | "xl"The field's height and the calendar's size, fromxstoxl. AsizeonDateRangePickerInputorDateRangePickerCalendarwins for that part.
Emits
- update:modelValue
[range: DateRange]Fires when a typed end completes or clears, and on each pick in the calendar, including the partial{ start, end: undefined }.- update:placeholder
[date: DateValue]Fires when the calendar pages to another month.- update:startValue
[date: DateValue | undefined]Fires when a start is picked in the calendar, before there is an end.- update:open
[value: boolean]Fires when the calendar opens or closes.- focus
[event: FocusEvent]Fires once when focus enters the picker: the segments, the trigger and the calendar count as one control.- blur
[event: FocusEvent]Fires once when focus leaves the segments, the trigger and the calendar, not when it moves between them.
Slots
- default
{ modelValue: DateRange | null | undefined; open: boolean; }The parts, with{ modelValue, open }. Left empty, it rendersDateRangePickerInputand the calendar inDateRangePickerContent, and passes its own attributes to the field.
Props
- variant
"outline" | "soft" | "filled" | "ghost" | "subtle"The text control look, shared withInput:outline,soft,filled,ghostorsubtle. Defaults to the root's, thenoutline. Inside an input group, the group's.- size
"xs" | "sm" | "md" | "lg" | "xl"The field's height, from 28px atxsto 48px atxl. Defaults to the root's, thenmd. Inside an input group, the group's. The calendar follows it unless it has its own.
Slots
- default
anyWhat follows the end's segments in the frame.DateRangePickerTriggerby default.
Props
- asChild
booleanRender the single child instead of a wrapper, merging the attributes onto it.- as
"span" AsTag | ComponentThe element or component to render. Aspanby default.- placeholder
stringThe text shown while there is no start, muted throughdata-placeholder.- format
Intl.DateTimeFormatOptionsIntl.DateTimeFormatoptions for both ends. Defaults to{ dateStyle: 'medium' }, plustimeStyle: 'short'when the values have time. The ends are joined withformatRange, which writes what they share once: "Oct 6 – 12, 2026".
Slots
- default
{ value: DateRange | null | undefined; formatted: string | undefined; }The text, with{ value, formatted }. While only the start is set,formattedis the start and a dash.
Props
- size
CalendarSizeSets the day cells, arrows and text fromxstoxl. Defaults to the field's size, then the root's.- color
CalendarColorThe tone of the range's ends, its band and today's outline:primary,neutral,destructive,success,warning,info, or a name you define.- weekNumbers
booleanAdds a column of week numbers before each row. Hidden from screen readers.
Slots
- default
{ date: DateValue; grid: Grid<DateValue>[]; weekDays: string[]; weekStartsOn: WeekStartsOn; locale: string; fixedWeeks: boolean; modelValue: DateRange; }Replaces the calendar's layout, with Reka's{ date, grid, weekDays, weekStartsOn, locale, fixedWeeks, modelValue }. Compose the RangeCalendar parts in it.- heading
{ headingValue: string; date: DateValue; setPlaceholder: (date: DateValue) => void; }The heading's content, with{ headingValue, date, setPlaceholder }.- week-day
{ day: string; index: number; }A weekday header's content, with{ day, index }.- day
{ day: DateValue; dayValue: string; selected: boolean; today: boolean; disabled: boolean; unavailable: boolean; outsideView: boolean; outsideVisibleView: boolean; highlighted: boolean; highlightedStart: boolean; highlightedEnd: boolean; selectionStart: boolean; selectionEnd: boolean; }A day's content, with the day's state, includingselectionStart,selectionEndandhighlighted.- prev-icon
anyThe Previous arrow's icon, a chevron by default.- next-icon
anyThe Next arrow's icon, a chevron by default.
Props
- asChild
booleanHands the trigger's behaviour to your own button, such as an outlineButtonwith aDatePickerValuein it. Without a field, that button takes the Field'sidand wiring.- as
AsTag | ComponentThe element or component to render. Abuttonby default.
Slots
- default
anyThe icon, a calendar by default. Withas-child, the button that opens the calendar.
Props
- forceMount
booleanKeeps the panel mounted while closed, for animating it with a JavaScript library.- memoDependencies
unknown[]Values that should re-run the position update when they change.- side
"top" | "right" | "bottom" | "left"The side of the field to open on. Flips to the other side when there is no room, unlessavoidCollisionsis off.- sideOffset
4 numberDistance in pixels from the field.4by default.- sideFlip
booleanFlips to the opposite side when the preferred one would overflow.- align
"start" "start" | "center" | "end"Alignment against the field along the chosen side.startby default, so the calendar lines up with the field's start.- alignOffset
numberOffset in pixels from thealignposition.- alignFlip
booleanFlips the alignment when it would overflow.- avoidCollisions
booleanKeeps the panel inside the collision boundary by flipping and shifting it.- collisionBoundary
Element | (Element | null)[] | nullThe element or elements used as the collision boundary. The viewport by default.- collisionPadding
8 number | Partial<Record<"top" | "right" | "bottom" | "left", number>>Distance in pixels from the boundary edges where collisions start.8by default.- arrowPadding
numberPadding between an arrow and the panel's corners.- hideShiftedArrow
booleanHides an arrow when the panel is shifted so far that the arrow would not point at the field.- sticky
"partial" | "always"partialkeeps the panel attached to the field while scrolling;alwaysalso lets it detach from the field to stay in the boundary.- hideWhenDetached
booleanHides the panel when the field is scrolled out of view.- positionStrategy
"absolute" | "fixed"The CSS position used to place the panel.- updatePositionStrategy
"always" | "optimized"alwaysrecomputes the position on every animation frame instead of only on layout changes.- disableUpdateOnLayoutShift
booleanStops recomputing the position when the layout shifts.- prioritizePosition
booleanKeeps the preferred side and alignment and lets the panel overflow instead of flipping.- reference
ReferenceElementA virtual element to position against instead of the field or the trigger.- dir
DirectionReading direction of the panel. Defaults to the picker'sdir, so presets and buttons beside the calendar mirror with it.- asChild
booleanRender the single child instead of a wrapper, merging this part's attributes and classes onto it.- as
AsTag | ComponentThe element or component to render.- disableOutsidePointerEvents
booleanShuts the page to the pointer while open, asmodalon the root does.
Emits
- escapeKeyDown
[event: KeyboardEvent]Fires on Escape. CallpreventDefault()to keep it open.- pointerDownOutside
[event: PointerDownOutsideEvent]Fires on a pointer press outside. CallpreventDefault()to keep it open.- focusOutside
[event: FocusOutsideEvent]Fires when focus moves outside. CallpreventDefault()to keep it open.- interactOutside
[event: PointerDownOutsideEvent | FocusOutsideEvent]Fires on any press or focus outside. CallpreventDefault()to keep it open.- openAutoFocus
[event: Event]Fires before focus moves to the selected day, today or the first day you can pick. CallpreventDefault()to keep focus where it is.- closeAutoFocus
[event: Event]Fires when focus returns to the trigger on close. CallpreventDefault()to keep focus where it is.
Slots
- default
anyThe calendar, and whatever goes with it: presets, a Done button, a note.
Data attributes
DateRangePickerCalendar is a RangeCalendar and the field holds an InputDateRange; their attributes apply.
| data-slot | Attributes | Description |
|---|---|---|
| date-range-picker-input | data-variant, data-size, data-state, data-disabled | The frame around both ends and the trigger. data-state is open while the calendar is. |
| date-picker-trigger | data-state, data-color, aria-expanded | The calendar button. |
| date-range-picker-value | data-placeholder | The formatted range, or the placeholder text. |
| date-picker-content | data-state, data-side, data-align | The popover around the calendar, a role="dialog". |
| date-range-picker-native-input | — | The hidden inputs, name[start] and name[end], when the trigger is a button. |
Accessibility
As on the Date Picker. When the calendar opens, focus goes to the start, else today. Each day in the range is announced as selected; moving over the days after a start previews the range.
| Key | Action |
|---|---|
| Tab / Shift + Tab | Moves through the start's segments, the end's, then the calendar button. |
| Alt + ArrowDown | Opens the calendar from a segment. |
| Arrow keys | In the calendar, move a day or a week. After a start, they preview the range. |
| Enter / Space | Picks the start, then the end. |
| Escape | Closes the calendar. In the middle of a pick, the last range comes back. |