@k8ordo/ui

Calendar

A month grid for picking one day. The value is YYYY-MM-DD, and it submits nothing to a form.

Import

ts
import { Calendar } from '@k8ordo/ui';

Usage

tsx
<Calendar defaultValue="2026-09-25" onChange={setDay} />

Min and max

tsx
<Calendar
  defaultValue="2026-09-25"
  max="2026-09-30"
  min="2026-09-10"
/>

Keyboard

Arrow keys move by day and week. Home and End go to the ends of the week. PageUp and PageDown go to the previous and next month, or year with Shift. Enter or Space selects.

Language and today

Month and weekday names, and the first day of the week, follow the same @k8ordo/i18n locale as the built-in wording. Today depends on the visitor’s time zone, so the calendar renders in the browser alone, and the server writes an empty box of the same size.

Props

defaultValue?
Type: string
Default: -
max?
Type: string
Default: -
min?
Type: string
Default: -
onChange?
Type: (value: string) => void
Default: -
value?
Type: string|null
Default: -
PropTypeDefault
defaultValue?string-
max?string-
min?string-
onChange?(value: string) => void-
value?string|null-

The wording this component draws (labels, placeholders, and so on) comes from the message dictionary unless a prop sets it. To replace it, see: i18n

k8ordo

React libraries that use Baseline features without holding back.