Skip to content
Klarhimmel UI

Calendar

November 2026

MonTueWedThuFriSatSun
npx shadcn add @klarhimmel/calendar

Examples

  • Basic

  • Limits

  • Sunday

DetailsAbout, usage, props and more

A month of days to choose from: the WAI-ARIA date picker grid, with today named and unavailable days said.

When to use

  • Use for

    Choosing a day when seeing the month helps: a booking, a deadline.

  • Not for

    A date people already know. Use Date picker, so they can type it.

  • Pairs with

    Date picker, Popover, a status line.

Preview

November 2026

MonTueWedThuFriSatSun

Chosen: 2026-11-18. Arrow keys move, Page Up and Page Down change month.

calendar.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Calendar } from '@/components/klarhimmel/ui/calendar';

export default function Example() {
  return (
    <Theme theme="brand">
      <Calendar defaultValue="2026-11-20" today="2026-11-16" />
    </Theme>
  );
}

Import

Import

import { Calendar } from '@/components/klarhimmel/ui/calendar';
Files
calendar.tsx, in components/klarhimmel/ui/. With it: theme, utils. npm: lucide-react.
Render in
Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

Props

PropTypeDefaultDescription
valuestring-The chosen day, "YYYY-MM-DD", or "" for none.
defaultValuestring''The chosen day as 'YYYY-MM-DD'; '' means none. Controlled or uncontrolled.
onValueChange(value: string) => void-The chosen day as 'YYYY-MM-DD'; '' means none. Controlled or uncontrolled.
monthstring-The month shown, "YYYY-MM". Defaults to the chosen day's month, then today's, then the month of `today`.
onMonthChange(month: string) => void-The month shown, 'YYYY-MM'.
minstring-The earliest and latest day that can be chosen. Other days are shown but cannot be picked.
maxstring-Days that cannot be chosen are struck through and aria-disabled; arrows still pass over them.
isDisabled(iso: string) => boolean-Days that cannot be chosen are struck through and aria-disabled; arrows still pass over them.
todaystring-Today, "YYYY-MM-DD". Marked with a ring and the word. Never read from the clock here, so it renders the same on the server.
firstDay'mon' | 'sun''mon'Where the week starts; the language names are written in.
localestring'en'Where the week starts; the language names are written in.
aria-labelstring-Names the grid when there is no other label.
autoFocusboolean-Move focus to the day when it mounts (a calendar opened from a button).
labels{ previous: string; next: string; today: string }{ previous: 'Previous month', next:…Button names and the word added to today's name. Pass them translated.
classNamestring-Extra classes, merged after the component's own.

Accessibility

KeyDoes
TabEnters the grid on one day (the chosen day, else today)
Left / RightA day back or forward, across months
Up / DownA week back or forward
Home / EndThe start or the end of the week
Page Up / Page DownA month back or forward; with Shift, a year
Enter / SpaceChooses the day

The WAI-ARIA date picker grid. The month is announced when it changes; days that cannot be chosen stay focusable, say so, and are struck through.

Accessibility