Skip to content

Range Calendar

Free

Pick a start and an end date on a month grid. A band joins the days between them, and two months can show side by side.

  • Base UI
  • React Aria
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

The value is an object with start and end. Press once for the start and once for the end, or drag.

trip-dates.tsx

RangeCalendar

PropTypeDefaultDescription
valueRangeValue<T> | null—The current value (controlled).
defaultValueRangeValue<T> | null—The default value (uncontrolled).
aria-labelstring—Defines a string value that labels the current element.
aria-labelledbystring—Identifies the element (or elements) that labels the current element.
aria-describedbystring—Identifies the element (or elements) that describes the object.
aria-detailsstring—Identifies the element (or elements) that provide a detailed, extended description for the object.
idstring—The element's unique identifier. See MDN.
dirstring—
langstring—
hiddenboolean—
inertboolean—
translate"no""yes"—
suppressHydrationWarningboolean—A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs.
onClickMouseEventHandler<HTMLDivElement>—
onClickCaptureMouseEventHandler<HTMLDivElement>—
onAuxClickMouseEventHandler<HTMLDivElement>—
onAuxClickCaptureMouseEventHandler<HTMLDivElement>—
onContextMenuMouseEventHandler<HTMLDivElement>—
onContextMenuCaptureMouseEventHandler<HTMLDivElement>—
onDoubleClickMouseEventHandler<HTMLDivElement>—
onDoubleClickCaptureMouseEventHandler<HTMLDivElement>—
onMouseDownMouseEventHandler<HTMLDivElement>—
onMouseDownCaptureMouseEventHandler<HTMLDivElement>—
onMouseEnterMouseEventHandler<HTMLDivElement>—
onMouseLeaveMouseEventHandler<HTMLDivElement>—
onMouseMoveMouseEventHandler<HTMLDivElement>—
onMouseMoveCaptureMouseEventHandler<HTMLDivElement>—
onMouseOutMouseEventHandler<HTMLDivElement>—
onMouseOutCaptureMouseEventHandler<HTMLDivElement>—
onMouseOverMouseEventHandler<HTMLDivElement>—
onMouseOverCaptureMouseEventHandler<HTMLDivElement>—
onMouseUpMouseEventHandler<HTMLDivElement>—
onMouseUpCaptureMouseEventHandler<HTMLDivElement>—
onTouchCancelTouchEventHandler<HTMLDivElement>—
onTouchCancelCaptureTouchEventHandler<HTMLDivElement>—
onTouchEndTouchEventHandler<HTMLDivElement>—
onTouchEndCaptureTouchEventHandler<HTMLDivElement>—
onTouchMoveTouchEventHandler<HTMLDivElement>—
onTouchMoveCaptureTouchEventHandler<HTMLDivElement>—
onTouchStartTouchEventHandler<HTMLDivElement>—
onTouchStartCaptureTouchEventHandler<HTMLDivElement>—
onPointerDownPointerEventHandler<HTMLDivElement>—
onPointerDownCapturePointerEventHandler<HTMLDivElement>—
onPointerMovePointerEventHandler<HTMLDivElement>—
onPointerMoveCapturePointerEventHandler<HTMLDivElement>—
onPointerUpPointerEventHandler<HTMLDivElement>—
onPointerUpCapturePointerEventHandler<HTMLDivElement>—
onPointerCancelPointerEventHandler<HTMLDivElement>—
onPointerCancelCapturePointerEventHandler<HTMLDivElement>—
onPointerEnterPointerEventHandler<HTMLDivElement>—
onPointerLeavePointerEventHandler<HTMLDivElement>—
onPointerOverPointerEventHandler<HTMLDivElement>—
onPointerOverCapturePointerEventHandler<HTMLDivElement>—
onPointerOutPointerEventHandler<HTMLDivElement>—
onPointerOutCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCapturePointerEventHandler<HTMLDivElement>—
onGotPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCapturePointerEventHandler<HTMLDivElement>—
onLostPointerCaptureCapturePointerEventHandler<HTMLDivElement>—
onScrollUIEventHandler<HTMLDivElement>—
onScrollCaptureUIEventHandler<HTMLDivElement>—
onWheelWheelEventHandler<HTMLDivElement>—
onWheelCaptureWheelEventHandler<HTMLDivElement>—
onAnimationStartAnimationEventHandler<HTMLDivElement>—
onAnimationStartCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationEndAnimationEventHandler<HTMLDivElement>—
onAnimationEndCaptureAnimationEventHandler<HTMLDivElement>—
onAnimationIterationAnimationEventHandler<HTMLDivElement>—
onAnimationIterationCaptureAnimationEventHandler<HTMLDivElement>—
onTransitionCancelTransitionEventHandler<HTMLDivElement>—
onTransitionCancelCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionEndTransitionEventHandler<HTMLDivElement>—
onTransitionEndCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionRunTransitionEventHandler<HTMLDivElement>—
onTransitionRunCaptureTransitionEventHandler<HTMLDivElement>—
onTransitionStartTransitionEventHandler<HTMLDivElement>—
onTransitionStartCaptureTransitionEventHandler<HTMLDivElement>—
style—The inline style for the element. A function may be provided to compute the style based on component state.
children—The children of the component. A function may be provided to alter the children based on component state.
slotstring | null—A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent.
render—Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if <button> is expected, you cannot render an <a>). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
minValueDateValue | null—The minimum allowed date that a user may select.
maxValueDateValue | null—The maximum allowed date that a user may select.
autoFocusbooleanfalseWhether to automatically focus the calendar when it mounts.
focusedValueDateValue | null—Controls the currently focused date within the calendar.
defaultFocusedValueDateValue | null—The date that is focused when the calendar first mounts (uncontrolled).
onFocusChange—Handler that is called when the focused date changes.
pageBehavior"single""visible"visibleControls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.
firstDayOfWeek"fri""mon""sat""sun""thu""tue""wed"—The day that starts the week.
selectionAlignment"center""end""start"'center'Determines the alignment of the visible months on initial render based on the current selection or current date if there is no selection.
allowsNonContiguousRangesboolean—When combined with isDateUnavailable, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected.
isDateUnavailable—Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. The second argument provides the current selection anchor date, if any. This can be used to adjust the available dates based on the user's first selected date.
commitBehavior"clear""reset""select"'select'Controls the behavior when a pointer is released outside the calendar or a blur occurs mid selection: - clear: clear the currently selected range of dates. - reset: reset the selection to the previously selected range of dates. - select: select the currently hovered range of dates.
visibleDurationDateDuration{ months: 1 }The amount of days that will be displayed at once. This affects how pagination works.
createCalendar—A function to create a new Calendar object for a given calendar identifier. If not provided, the createCalendar function from @internationalized/date will be used.
disabledboolean—Turns off the control: no focus, no edits, and the disabled look.
readOnlyboolean—The user can focus and read the value, but cannot change it.
invalidboolean—Shows the invalid look and sets aria-invalid.
onValueChange—Runs on each change, with the new value and the Base UI change details.
classNamestring—
size"default""lg""sm""default"The cell size: sm 28, default 32, lg 36. On a touch screen every size grows to 44.
weeksInMonthnumber | "auto"—The rows of a month view. Default 6, so the height never changes when the user pages. "auto": the rows of each month (4 to 6, React Aria). Week and day views ignore it.
labelsPartial<{ weekNumber: string; }>—The words (CALENDAR_LABELS), to translate them. Keep the object stable.
  • Use it when the grid can stay on the page, such as a hotel page.
  • Use isDateUnavailable(date, anchorDate) to limit a range, such as seven nights at most.
  • Use allowsNonContiguousRanges when a range may cross unavailable days.
  • Use commitBehavior to set what happens when focus leaves a half range: select, reset, or clear.
TabMoves focus between the previous button, the next button, and the grid.
Left ArroworRight ArrowMoves focus one day back or on. Right to left swaps them.
Up ArroworDown ArrowMoves focus one row up or down.
Page UporPage DownGoes one month back or on. With Shift, goes one year.
HomeorEndGoes to the start or the end of the month.
EnterorSpaceSets the start date, then the end date.
EscapeDrops a half range.

It is a React Aria range calendar. The month is a grid, and each day is a button in a grid cell.

Give it an aria-label, or put it next to a label that names it.

Enter sets the start, the arrow keys move the end, and a second Enter ends the range.

On a touch screen each cell grows to 44 × 44px, and the band grows with it.

Built with

Installs with Range Calendar

Components
Calendar
  1. AddedRange Calendar, with Calendar.
Open the release