Calendar
Inline month grid for single-date selection; kui-calendar-range selects a start and end pair.
Calendar is a standalone component with optional locale provider helpers.
import {
KuiCalendar,
type KuiCalendarMessages,
provideKikitaUi,
provideKuiLocale,
} from '@kikita-labs/ui';Bind value with a signal and keep Date objects in component state.
<div class="basic-calendar-example">
<kui-calendar [(value)]="selectedDate" [minDate]="minDate" showFooter />
<kui-calendar size="sm" flat [(value)]="selectedDate" />
</div>The installed API covers disabled dates, bounds, the footer, a hidden navigation control and popover-friendly flat mode.
<div class="calendar-states-example">
<kui-calendar
[(value)]="selectedDate"
[minDate]="minDate"
[maxDate]="maxDate"
[disabledDates]="holidays"
/>
<kui-calendar [(value)]="selectedDate" [disabledDates]="isWeekend" [showWeekend]="false" />
</div>- Use
kui-calendar-range(KuiCalendarRange) when the value is aKuiDateRange;kui-calendarselects a single date. minDate,maxDateanddisabledDatesblock days;disabledDatestakes dates or a predicate.minDateandmaxDateare models, so a paired date picker can wire them for you.- Use
flatinsidekui-dropdownso panel chrome is not doubled, andsize="sm"for tight sidebars. The width is--kui-calendar-width(296px). viewDate(a first-of-month date, two-way) moves the displayed month from the outside.showPrevNavandshowNextNavhide one navigation control for two linked calendars a month apart.- Placed next to
input[kuiDatePicker]in the samekui-field, the directive wiresvalue,viewDateand the bounds automatically; see Date Picker.
Month and weekday names, the heading order, the first day of the week and the weekend come from Intl for the locale of the nearest i18n level, with no bundled locale data.
<div class="calendar-locale-example">
<kui-calendar locale="ja-JP" size="sm" [(value)]="selectedDate" />
<kui-calendar
locale="de-DE"
size="sm"
showFooter
[messages]="messages"
[(value)]="selectedDate"
/>
</div>- The locale starts from the app-wide
KUI_LOCALE(the browser language, or the request's Accept-Language on the server), falls back toen-US, and is overridden per instance by thelocaleinput. - Day buttons are named with the full localized date, for example
Saturday, October 3, 2026, and the weekend follows the locale (a Friday and Saturday weekend inhe-IL). messagesoverrides the calendar texts for one instance; it wins over scoped and root messages. Names use the Gregorian calendar and Latin digits.
import { provideKikitaUi } from '@kikita-labs/ui';
provideKikitaUi({ locale: 'ja-JP' });Set defaults.calendar once for the application or for a subtree. Each option resolves as local input > defaults.calendar.<option> > built-in default.
import { provideKikitaUi } from '@kikita-labs/ui';
export const appConfig: ApplicationConfig = {
providers: [
provideKikitaUi({
defaults: {
calendar: {
/* options below */
},
},
}),
],
};| Name | Type | Default | Description |
|---|---|---|---|
| size | 'md' | 'sm' | — | Calendar size. Takes precedence over the global defaults.size. |
| flat | boolean | — | Strips the calendar's own background, border and padding. |
| showWeekend | boolean | — | Shows Saturday and Sunday in a muted colour. |
| showFooter | boolean | — | Shows the footer with the current value and the "Today" shortcut. |
| showPrevNav | boolean | — | Shows the "previous" navigation control in the header. |
| showNextNav | boolean | — | Shows the "next" navigation control in the header. |
| previousIcon | KuiIconGlyph | — | Icon of the previous control. Takes precedence over defaults.icons.previous. See Structural Icons. |
| nextIcon | KuiIconGlyph | — | Icon of the next control. Takes precedence over defaults.icons.next. See Structural Icons. |
Set any of these on the component or an ancestor to restyle one part. Each token is optional: when it is not set, the part uses the role or scale token in the default column.
| Name | Type | Default | Description |
|---|---|---|---|
| --kui-calendar-bg | CSS custom property | --kui-color-surface | Background |
| --kui-calendar-border | CSS custom property | --kui-color-border | Border color |
| --kui-calendar-color | CSS custom property | --kui-color-text | Color |
| --kui-calendar-title-color | CSS custom property | --kui-color-text | Title color |
| --kui-calendar-day-color | CSS custom property | --kui-color-text | Day color |
| --kui-calendar-day-focus-ring-color | CSS custom property | --kui-color-focus | Day focus ring color |
| --kui-calendar-day-color-muted | CSS custom property | --kui-color-text-secondary | Day color, muted |
| --kui-calendar-day-color-weekend | CSS custom property | --kui-color-text-secondary | Day color, weekend |
| --kui-calendar-day-bg-selected | CSS custom property | --kui-color-primary-fill | Day background, selected |
| --kui-calendar-day-color-selected | CSS custom property | --kui-color-primary-on-fill | Day color, selected |
| --kui-calendar-day-color-range-middle | CSS custom property | --kui-color-primary-soft-text | Day color, range middle |
| --kui-calendar-day-bg-range-start | CSS custom property | --kui-color-primary-fill | Day background, range start |
| --kui-calendar-day-color-range-start | CSS custom property | --kui-color-primary-on-fill | Day color, range start |
| --kui-calendar-day-bg-range-end | CSS custom property | --kui-color-primary-fill | Day background, range end |
| --kui-calendar-day-color-range-end | CSS custom property | --kui-color-primary-on-fill | Day color, range end |
| --kui-calendar-day-bg-range-edge-hover | CSS custom property | --kui-color-primary-fill-hover | Day background, range edge hover |
| --kui-calendar-day-bg-range-middle-hover | CSS custom property | ? | Day background, range middle hover |
| --kui-calendar-day-bg-selected-hover | CSS custom property | --kui-color-primary-fill-hover | Day background, selected hover |
| --kui-calendar-value-color | CSS custom property | --kui-color-text-secondary | Value color |
| --kui-calendar-picker-cell-color | CSS custom property | --kui-color-text | Picker cell color |
| --kui-calendar-picker-cell-focus-ring-color | CSS custom property | --kui-color-focus | Picker cell focus ring color |
| --kui-calendar-picker-cell-bg-active | CSS custom property | --kui-color-primary-fill | Picker cell background, active |
| --kui-calendar-picker-cell-color-active | CSS custom property | --kui-color-primary-on-fill | Picker cell color, active |
| --kui-calendar-picker-cell-color-muted | CSS custom property | --kui-color-text-secondary | Picker cell color, muted |
| Name | Type | Default | Description |
|---|---|---|---|
| --kui-calendar-radius | CSS custom property | --kui-radius-lg | Corner radius |
| --kui-calendar-padding | CSS custom property | --kui-space-4 | Padding |
| --kui-calendar-title-font-size | CSS custom property | --kui-text-sm-size | Title font size |
| --kui-calendar-title-padding-inline | CSS custom property | --kui-space-2 | Title padding, inline |
| --kui-calendar-nav-spacer-size | CSS custom property | --kui-control-height-xs | Nav spacer size |
| --kui-calendar-weekday-font-size | CSS custom property | --kui-text-xs-size | Weekday font size |
| --kui-calendar-weekday-padding-bottom | CSS custom property | --kui-space-2 | Weekday padding, bottom |
| --kui-calendar-day-font-size | CSS custom property | --kui-text-sm-size | Day font size |
| --kui-calendar-footer-gap | CSS custom property | --kui-space-2 | Footer gap |
| --kui-calendar-value-font-size | CSS custom property | --kui-text-xs-size | Value font size |
| --kui-calendar-picker-grid-gap | CSS custom property | --kui-space-2 | Picker grid gap |
| --kui-calendar-picker-cell-padding-block | CSS custom property | --kui-space-3 | Picker cell padding, block |
| --kui-calendar-picker-cell-padding-inline | CSS custom property | --kui-space-2 | Picker cell padding, inline |
| --kui-calendar-picker-cell-radius | CSS custom property | --kui-radius-sm | Picker cell corner radius |
| --kui-calendar-picker-cell-font-size | CSS custom property | --kui-text-sm-size | Picker cell font size |
| --kui-calendar-padding-sm | CSS custom property | --kui-space-3 | Padding, sm |
| --kui-calendar-day-font-size-sm | CSS custom property | --kui-text-xs-size | Day font size, sm |
| --kui-calendar-weekday-font-size-sm | CSS custom property | --kui-text-2xs-size | Weekday font size, sm |
| --kui-calendar-width-sm | CSS custom property | 252px | Width, sm |
Every text the component owns (accessible names, visible words, announcements) is a typed message with an English default. Override it for the application with provideKikitaUi({ messages }), or for a subtree with provideKuiMessages.
| Name | Type | Default | Description |
|---|---|---|---|
| label | string | — | Accessible name of the day grid. Default Calendar. |
| today | string | — | Text of the footer shortcut to the current day. Default Today. |
| previousMonth | string | — | Previous button of the day view. Default Previous month. |
| nextMonth | string | — | Next button of the day view. Default Next month. |
| previousYear | string | — | Previous button of the month view. Default Previous year. |
| nextYear | string | — | Next button of the month view. Default Next year. |
| previousDecade | string | — | Previous button of the year view. Default Previous decade. |
| nextDecade | string | — | Next button of the year view. Default Next decade. |
Inputs, models, projection slots, provider defaults, messages and locale helpers verified against @kikita-labs/ui v2.0.0 public typings.
| Name | Type | Default | Description |
|---|---|---|---|
| [(value)] | Date | null | null | Selected date. For a start and end pair use kui-calendar-range, whose value is a KuiDateRange | null. Next to input[kuiDatePicker] in the same field the directive wires it for you. |
| messages | Partial<KuiCalendarMessages> | undefined | undefined | Per-instance text overrides (label, today, previousMonth, nextMonth, previousYear, nextYear, previousDecade, nextDecade). They win over scoped and root messages. |
| [(viewDate)] | Date | current month | First-of-month date that controls the visible month. |
| size | 'md' | 'sm' | 'md' | Calendar density. Use sm when embedding in tighter sidebars or panels. |
| flat | boolean | false | Removes the calendar frame for dropdown or popover panel composition. |
| showWeekend | boolean | true | Mutes the weekend days of the locale (Saturday and Sunday in en-US) when enabled. |
| showFooter | boolean | false | Shows the built-in value summary and Today shortcut. |
| [(minDate)] / [(maxDate)] | Date | undefined | undefined | Inclusive lower and upper bounds for selectable days. Models, so a paired input[kuiDatePicker] can wire them from its own bounds. |
| disabledDates | Date[] | ((date: Date) => boolean) | undefined | undefined | Individual disabled dates or a predicate evaluated for each rendered date. |
| locale | string | undefined | KUI_LOCALE | BCP 47 locale override for month names, weekday names, the heading, week start and weekend. It wins over the locale of the nearest KuiI18n level. |
| showPrevNav / showNextNav | boolean | true | Hide one header navigation control for linked multi-calendar layouts. |
| [kuiCalendarHeader] / [kuiCalendarFooter] | projected content | - | Replace the default header or footer with consumer-owned content. |
| provideKuiLocale(locale) | Provider[] | - | Sets the locale of a subtree (a tag, a Signal or a function). Use provideKikitaUi({ locale }) for the whole application. |
| --kui-calendar-width | CSS custom property | 296px | Overrides the fixed calendar width while keeping the day grid predictable. |
| KuiCalendarOptions / KuiCalendarViewOptions | interfaces | - | Shape of defaults.calendar (size, flat, showWeekend, showFooter, showPrevNav, showNextNav, previousIcon, nextIcon), shared with kui-calendar-range. |
| KuiCalendarMessages | interface | - | Typed messages of the calendar and the calendar range, with English defaults. |
| kui-picked | DOM event | - | Bubbling event the calendar dispatches after a date pick, so an enclosing kui-dropdown can close. |
Calendar owns grid semantics and roving focus; consumers provide context around the picker.
- The day grid is a complete ARIA grid:
role="grid"holds the weekday header row (columnheadercells carry the full weekday name asabbr) and six weekrows of sevengridcells, each wrapping one day button. aria-selectedsits on the selected gridcell, not on the button; today exposesaria-current="date"and disabled datesaria-disabled.- One day is in the tab order at a time: the selected date when it is in the displayed month, otherwise today when visible, otherwise the first day of the month.
- Keyboard:
ArrowLeftandArrowRightmove a day,ArrowUpandArrowDowna week,HomeandEndthe start and end of the week,PageUpandPageDowna month (withShifta year), andEnterorSpaceselects. Focus follows into the next month. - Month and year changes are announced through an
aria-live="polite"region. - Provide nearby text or a surrounding field label when the calendar appears in a larger form.
- Assistive-technology review is still pending for the newest date primitives.
Consumer-visible changes of @kikita-labs/ui 2.0 for the calendar.
- The class is
KuiCalendar(it wasKuiCalendarComponent);ng update @kikita-labs/uirenames the import. kui-calendaris single-date only: themodeinput and theDate | KuiDateRange | nullvalue union are gone. Range selection moved tokui-calendar-range.kuiProvideLocaleisprovideKuiLocaleand returns an array of providers; the locale is checked against the runtime's Intl and falls back toen-US.- The grid markup is a full ARIA grid. CSS that targets
.kui-calendar-grid > .kui-calendar-daymust target.kui-calendar-dayor the new week and cell wrappers; tests that look up a day button by its bare number must use the full date as its name.
<!-- 1.x -->
<kui-calendar mode="range" [(value)]="sprint" />
<!-- 2.0: a separate component, value is KuiDateRange | null -->
<kui-calendar-range [(value)]="sprint" />