Dates
Calendar & RangeCalendar
Inline month grids for choosing a date or a range — for booking flows and dashboards where the calendar is the main control.
import '@reactloom/dates/styles.css';
import { Calendar, RangeCalendar } from '@reactloom/dates';Examples
Single date
Weekends are unavailable.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
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 | 3 | 4 | 5 |
Selected: 2026-11-10 · weekends unavailable
import { Calendar, isWeekend, parseDate, type DateValue } from '@reactloom/dates';
import { Stack, Text, useLocale } from '@reactloom/ui';
import { useState } from 'react';
export default function Example() {
const { locale } = useLocale();
const [value, setValue] = useState<DateValue>(parseDate('2026-11-10'));
return (
<Stack gap="2">
<Calendar aria-label="Appointment" value={value} onValueChange={setValue} isDateUnavailable={(date) => isWeekend(date, locale)} />
<Text size="sm" tone="muted">Selected: {value.toString()} · weekends unavailable</Text>
</Stack>
);
}Range
Click a start, then an end; two months side by side.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
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 | 3 | 4 | 5 |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
29 | 30 | 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 |
import { RangeCalendar, parseDate } from '@reactloom/dates';
export default function Example() {
return <RangeCalendar aria-label="Trip" visibleMonths={2} defaultValue={{ start: parseDate('2026-11-26'), end: parseDate('2026-12-04') }} />;
}API reference
| Prop | Type | Default |
|---|---|---|
value / defaultValue | DateValue | null | — |
onValueChange | (value) => void | — |
minValue · maxValue | DateValue | — |
isDateUnavailable | (date) => boolean | — |
visibleMonths | 1 | 2 | 3 | 1 |
aria-labelDefaults to the visible month. | string | — |
disabled · readOnly · autoFocus | boolean | false |
Accessibility
- A grid of buttons; month changes are announced.
- The first day of the week and weekday names follow the locale.
| Key | Action |
|---|---|
| Arrows | Move by day / week |
| Page Up / Page Down | Previous / next month |
| Shift + Page Up / Down | Previous / next year |
| Enter / Space | Select |
Usage guidelines
Do
- Show two months for ranges that often cross a month boundary.
Don’t
- Don’t use an inline calendar for a single field in a dense form — use DatePicker.