Date and time
RangeCalendar
March – April 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 1 | 2 | 3 | 4 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Selected: 2026-03-25 to 2026-04-07
March 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 1 | 2 | 3 | 4 |
Within March 9 to 22: none
When to use
- You need a custom composition of a range calendar inside your own panel.
- You need one or two visible months (
months={1 | 2}) and all of React Aria's constraints.
When not to use
- For a standard range field with presets and clearing, use
DateRangePicker. - For a single date, use
Calendar/DatePicker.
Minimal example
<RangeCalendar value={range} onChange={setRange} months={2} locale="ru-RU" />Public API
- Inherits React Aria's
RangeCalendarProps<DateValue>: controlledvalue,defaultValue,onChange,minValue,maxValue, unavailable dates. - An empty controlled value is passed as
null. - A range can be objects or ISO strings.
valueanddefaultValueaccept{ start, end }, where the bounds are either@internationalized/dateobjects orYYYY-MM-DDstrings (the strings are the same asDateRangeinDateRangePicker).minValue,maxValueanddefaultFocusedValueaccept a string too (minValue="2026-03-09"); there is no need to import@internationalized/date(the package itself comes with the kit). An unparsable string does not throw: a range with such a bound is treated as empty (half a range is never selected) and the bound as not set. onChange(range, iso)is called once both bounds are chosen. The first argument is{ start, end }of calendar objects, as in React Aria (it always was); the second is the same range as a pair of ISO strings, that is, the sameDateRange. Whoever stores the range as strings needs onlyonChange={(_, iso) => setRange(iso)}. WhatonChangereceives does not depend on whethervalueis passed as objects or strings: existing calls with objects work unchanged.isDateUnavailablereceives a calendar object:date.toString()returns the day as aYYYY-MM-DDstring.monthsis 1 or 2 and defaults to 1; withoutlocale, the locale comes from above: fromUiProvider, the consumer'sI18nProvideror the browser;localeoverrides it for this calendar.- A server-rendered calendar hydrates cleanly. The heading above the grid ("March – April 2026") is the same on the server and in the browser:
Intlin Node puts thin spaces around the dash, and the kit converts them to regular ones. The browser renders the "today" dot after mounting: the server does not know what day it is for the reader, so the first render has no dot.
Accessibility and keyboard
- React Aria handles range selection, grid semantics and the keyboard.
- The start and end of the range look different from the middle; do not replace this with arbitrary cell classes.
- See
src/components/date-time/RangeCalendar.tsx,src/components/date-time/RangeCalendar.stories.tsx,tests/matrix.tsx.
TypeScript types
RangeCalendarProps
Prop
Type
Plus DOM attributes, such as onClick, id, aria-label — 74 in total; the table does not repeat them.
DateRangePickerProps
Prop
Type