Date Range Picker
Preview
Install
Add it with your package manager, or copy the source manually.
Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide
Download the release archive to your project root, then install the local file.
Import the shared styles once in your application.
API Reference
DateRangePicker
v-model?DateRange | nullThe range, `{ from, to? }` as YYYY-MM-DD, or `null`. Use with `v-model`.
undefineddefaultValue?DateRange | nullUncontrolled initial range.
undefineddefaultMonth?stringMonth shown first, any date in it (YYYY-MM-DD).
—min?string—max?string—isDateDisabled?(date: string) => boolean—presets?readonly DateRangePreset[]—locale?string—label?string—disabled?booleanfalseautoFocus?booleanMove focus to the active date on mount (an inline calendar) or on open (the popover).
undefinedshowSummary?booleanShow the start/end summary above the calendar. Defaults to true inline, false in the popover.
undefinedclass?string—#default?slotCompose the picker from its parts. Omit it for the ready-made trigger and calendar.
—v-model:open?booleanControlled open state, `v-model:open`.
undefineddefaultOpen?booleanStarts open when `v-model:open` is not bound.
falsecloseOnSelect?booleanClose an open popover after a complete range or preset. Default false.
falselabels?Partial<DateRangePickerMessages>Override any built-in string.
—inline?booleanRender the calendar inline instead of behind a trigger.
falseplaceholder?stringTrigger text when no range is chosen.
—DateRangePickerCalendar
showSummary?booleanShow the start/end summary above the calendar. Defaults to the picker's `showSummary`.
undefinedclass?string—bare?booleanDrop the card chrome when the calendar sits inside a popover.
—#default?slotThe calendar's parts, in the order you want them.
—DateRangePickerSummary
class?string—DateRangePickerHeader
class?string—DateRangePickerGrid
class?string—DateRangePickerSelection
class?string—#default?slotReplaces the text.
—DateRangePickerClear
class?string—disabled?boolean—#default?slotReplaces the label.
—DateRangePickerFooter
class?string—#default?slotReplaces the default footer content.
—DateRangePickerPresets
class?string—#default?slotYour own `DateRangePickerPreset`s.
—DateRangePickerPreset
valueDateRange—labelstringAccessible preset name and selection announcement.
—class?string—disabled?boolean—#default?slotReplaces the visible label.
—DateRangePickerTrigger
placeholder?stringText when no range is chosen.
—class?string—disabled?boolean—#default?slotReplaces the icons and the range summary.
—DateRangePickerContent
autoFocus?booleanMove focus to the active calendar date when opened.
trueside?"bottom" | "top"bottomalign?"start" | "end"startsideOffset?numberGap between trigger and panel, in px.
—radius?numberPanel corner radius, in px.
16shadow?booleanDraw the surface shadow.
false@open-auto-focus?(content: HTMLElement) => voidRuns after the surface is positioned and visible, with its element.
—initialFocus?HTMLElement | null | (() => HTMLElement | null)Element to focus when a keyboard open shows the panel, instead of the active date.
—class?string—#default?slot—DateRangePickerDropdown
placeholder?stringTrigger text when no range is chosen.
—triggerClassName?stringExtra classes for the trigger.
—calendarClassName?stringExtra classes for the calendar.
—defaultValue?DateRange | nullUncontrolled initial range.
undefinedautoFocus?booleanMove focus to the active date on mount (an inline calendar) or on open (the popover).
trueclass?string—min?string—max?string—label?string—v-model?DateRange | nullThe range, `{ from, to? }` as YYYY-MM-DD, or `null`. Use with `v-model`.
undefineddisabled?booleanfalselabels?Partial<DateRangePickerMessages>Override any built-in string.
—locale?string—v-model:open?booleanControlled open state, `v-model:open`.
undefinedcloseOnSelect?booleanClose an open popover after a complete range or preset. Default false.
falsedefaultMonth?stringMonth shown first, any date in it (YYYY-MM-DD).
—isDateDisabled?(date: string) => boolean—presets?readonly DateRangePreset[]—showSummary?booleanShow the start/end summary above the calendar. Defaults to true inline, false in the popover.
falsedefaultOpen?booleanStarts open when `v-model:open` is not bound.
falseinline?booleanRender the calendar inline instead of behind a trigger.
falseUpdated