<kern-calendar>
Month view for picking a date or a range, inline or inside a picker. Values are ISO dates (2026-10-19). Keyboard (one tab stop): arrows move by day/week, Home/End to the start/end of the week, Page Up/Down by month, with Shift by year, Enter or Space picks. In range mode the first pick sets start, the second end (swapped if earlier); the range is previewed on hover and focus until then, Escape discards it.
Examples
Pick a date
An inline month view; value is an ISO date and kernChange reports { value }. show-week-numbers adds ISO weeks (column header label-week), and the footer slot takes actions such as a “Today” button that uses goTo().
Pick a range
With range the first pick sets start, the second end, and kernChange reports { start, end }. months="2" shows two months side by side; max-days locks days farther than that from start.
Limits and disabled days
min and max bound the selectable dates; isDateDisabled is a property taking a function from ISO date to boolean, e.g. to block weekends. Here only workdays in the last three months can be picked.
Properties
endstring | undefined
Range end (range mode).
firstDayOfWeeknumber | undefined
0 = Sunday … 6 = Saturday; defaults to the locale (Monday for de).
isDateDisabled((iso: string) => boolean) | undefined
Additional rule for unselectable days, e.g. weekends.
labelstring | undefined
Accessible name of the calendar.
labelNextstring | undefined
labelPrevstring | undefined
labelWeekstring | undefined
Column header of the week numbers.
localestring | undefined
BCP 47 locale; defaults to <html lang>, then the browser language.
maxstring | undefined
Latest selectable date.
maxDaysnumber | undefined
Range mode: longest range in days (inclusive); farther days are locked once start is picked.
minstring | undefined
Earliest selectable date.
months1 | 2
Months shown side by side.
rangeboolean
Pick a range (start/end) instead of a single value.
showWeekNumbersboolean
ISO week numbers in front of each row.
startstring | undefined
Range start (range mode).
valuestring | undefined
Selected date (single mode).
Events
kernChangeCustomEvent<{ start: string; end: string; } | { value: string; }>
A date was picked ({ value }), or a range completed ({ start, end }).
kernMonthChangeCustomEvent<{ year: number; month: number; }>
The shown month changed (month 1–12).
Methods
goTo()goTo(iso: string) => Promise<void>
Show the month of an ISO date and move the tab stop there (does not select).
setFocus()setFocus() => Promise<void>
Focus the active day.
Slots
footerActions below the month, e.g. a „Heute“ button
CSS parts
dayEach day button