Examples

Single date

Weekends are unavailable.

Preview
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

Selected: 2026-11-10 · weekends unavailable

Example.tsx
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.

Preview
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
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
Example.tsx
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

Calendar props
PropTypeDefault
value / defaultValue
DateValue | null—
onValueChange
(value) => void—
minValue · maxValue
DateValue—
isDateUnavailable
(date) => boolean—
visibleMonths
1 | 2 | 31
aria-label
Defaults to the visible month.
string—
disabled · readOnly · autoFocus
booleanfalse

Accessibility

  • A grid of buttons; month changes are announced.
  • The first day of the week and weekday names follow the locale.
Keyboard interactions
KeyAction
ArrowsMove by day / week
Page Up / Page DownPrevious / next month
Shift + Page Up / DownPrevious / next year
Enter / SpaceSelect

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.