GitHubnpm

Accent theme

Base radius

GitHubnpm

Accent theme

Base radius

Colour scheme

Docs menu

Guides


Primitives
Forms
Layout
Feedback
Overlays
Navigation
Data Display
AI

Date Picker

A calendar month is a genuine grid, rows of weeks, columns of days of the week, so it's a real <table>, not a <div> grid pretending to be one. Each day is a real <button>; the selected one gets aria-selected="true".

August 2026
SuMoTuWeThFrSa

Selected: none

Usage
import { useState } from "react";
import { DatePicker } from "@kernelui-lib/react";

function BookingDate() {
  const [date, setDate] = useState<Date>();

  return <DatePicker value={date} onValueChange={setDate} minDate={new Date()} />;
}

Playground

Toggle every adjustable prop and watch the component — and the code — update live.

August 2026
SuMoTuWeThFrSa

Selected: none

Unstyled

Same component — Kernel look stripped. See Platforms.

disable past dates
disable future dates
Usage
<DatePicker value={date} onValueChange={setDate} />

Props

Props for Date Picker.
PropTypeDefault
valueDate
defaultValueDate
onValueChange(date: Date) => void
minDateDate
maxDateDate

Accessibility

  • Previous/next month controls are real <button>s with aria-labels ("Previous month", "Next month"), since their icons carry no accessible name on their own.
  • The selected day gets aria-selected="true"; today's date gets a distinct dot indicator rather than being conflated with the selected state.
  • Days outside minDate/maxDate are real disabled buttons, not just dimmed text.
  • Days outside the displayed month render as non-interactive dimmed text, they aren't selectable without first navigating to that month.
  • Arrow Left/Right/Up/Down, Home, and End move focus between the day buttons currently rendered in the grid; Home/End jump to the start/end of the focused day's week. Crossing into the next or previous month still requires the month navigation buttons, arrow keys don't auto-page the calendar.