Calendar Range is a standalone component. Its value is a KuiDateRange.

calendar-range.ts
import { KuiCalendarRange, type KuiDateRange } from '@kikita-labs/ui';

Bind value to a signal of KuiDateRange | null. The first click sets the start, hovering before the second click previews the range, and the second click commits it. The first click after a committed range starts a new one.

SunMonTueWedThuFriSat

SunMonTueWedThuFriSat
<div class="calendar-range-example">
  <kui-calendar-range [(value)]="range" [(viewDate)]="viewDate" showFooter />

  <kui-calendar-range size="sm" flat [(value)]="range" [(viewDate)]="viewDate" />
</div>

viewDate defaults to the current month; the documented fallback to the month of value.start applies only when the value exists at construction, so bind [(viewDate)] to open the grid at the month of a template-bound range. end is null while the range is still open, so check it before using the value as a closed range. The header navigation and the Today button are ghost kuiButtons and the rule above the footer is hr[kuiSeparator]. Calendar Range reuses the Calendar stylesheet and class names, so it shares the Calendar theming tokens listed below.

minDate and maxDate are inclusive bounds. disabledDates takes dates or a predicate. showWeekend mutes the weekend of the locale.

SunMonTueWedThuFriSat
SunMonTueWedThuFriSat
<div class="calendar-range-example">
  <kui-calendar-range
    [(value)]="range"
    [(viewDate)]="viewDate"
    [minDate]="minDate"
    [maxDate]="maxDate"
    [disabledDates]="holidays"
  />

  <kui-calendar-range
    [(value)]="range"
    [(viewDate)]="viewDate"
    [disabledDates]="isWeekend"
    [showWeekend]="false"
  />
</div>

viewDate is a two-way model, so two ranges a month apart can be built from showPrevNav and showNextNav. A built-in range popover is not available; this layout is for custom compositions.

SunMonTueWedThuFriSat
SunMonTueWedThuFriSat
<div class="calendar-range-example">
  <kui-calendar-range [(value)]="range" [(viewDate)]="leftView" [showNextNav]="false" />

  <kui-calendar-range
    [(value)]="range"
    [viewDate]="rightView()"
    (viewDateChange)="showFromRight($event)"
    [showPrevNav]="false"
  />
</div>

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. locale and messages override them for one instance.

日月火水木金土
MoDiMiDoFrSaSo

<div class="calendar-range-example">
  <kui-calendar-range locale="ja-JP" size="sm" [(value)]="range" [(viewDate)]="viewDate" />

  <kui-calendar-range
    locale="de-DE"
    size="sm"
    showFooter
    [messages]="messages"
    [(value)]="range"
    [(viewDate)]="viewDate"
  />
</div>

Project an element with kuiCalendarHeader or kuiCalendarFooter to replace the matching default block completely.

SunMonTueWedThuFriSat
<kui-calendar-range [(value)]="range" [(viewDate)]="viewDate">
  <div kuiCalendarFooter class="calendar-range-footer">
    <button kuiButton shape="ghost" size="sm" type="button" (click)="clear()">Clear</button>
  </div>
</kui-calendar-range>

Set defaults.calendarRange once for the application or for a subtree. Each option resolves as local input > defaults.calendarRange.<option> > built-in default.

import { provideKikitaUi } from '@kikita-labs/ui';

export const appConfig: ApplicationConfig = {
  providers: [
    provideKikitaUi({
      defaults: {
        calendarRange: {
          /* options below */
        },
      },
    }),
  ],
};
NameTypeDefaultDescription
size'md' | 'sm' — Calendar size. Takes precedence over the global defaults.size.
flatboolean — Strips the calendar's own background, border and padding.
showWeekendboolean — Shows Saturday and Sunday in a muted colour.
showFooterboolean — Shows the footer with the current value and the "Today" shortcut.
showPrevNavboolean — Shows the "previous" navigation control in the header.
showNextNavboolean — Shows the "next" navigation control in the header.
previousIconKuiIconGlyph — Icon of the previous control. Takes precedence over defaults.icons.previous. See Structural Icons.
nextIconKuiIconGlyph — 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.

NameTypeDefaultDescription
--kui-calendar-bgCSS custom property--kui-color-surfaceBackground
--kui-calendar-borderCSS custom property--kui-color-borderBorder color
--kui-calendar-colorCSS custom property--kui-color-textColor
--kui-calendar-title-colorCSS custom property--kui-color-textTitle color
--kui-calendar-day-colorCSS custom property--kui-color-textDay color
--kui-calendar-day-focus-ring-colorCSS custom property--kui-color-focusDay focus ring color
--kui-calendar-day-color-mutedCSS custom property--kui-color-text-secondaryDay color, muted
--kui-calendar-day-color-weekendCSS custom property--kui-color-text-secondaryDay color, weekend
--kui-calendar-day-bg-selectedCSS custom property--kui-color-primary-fillDay background, selected
--kui-calendar-day-color-selectedCSS custom property--kui-color-primary-on-fillDay color, selected
--kui-calendar-day-color-range-middleCSS custom property--kui-color-primary-soft-textDay color, range middle
--kui-calendar-day-bg-range-startCSS custom property--kui-color-primary-fillDay background, range start
--kui-calendar-day-color-range-startCSS custom property--kui-color-primary-on-fillDay color, range start
--kui-calendar-day-bg-range-endCSS custom property--kui-color-primary-fillDay background, range end
--kui-calendar-day-color-range-endCSS custom property--kui-color-primary-on-fillDay color, range end
--kui-calendar-day-bg-range-edge-hoverCSS custom property--kui-color-primary-fill-hoverDay background, range edge hover
--kui-calendar-day-bg-range-middle-hoverCSS custom property?Day background, range middle hover
--kui-calendar-day-bg-selected-hoverCSS custom property--kui-color-primary-fill-hoverDay background, selected hover
--kui-calendar-value-colorCSS custom property--kui-color-text-secondaryValue color
--kui-calendar-picker-cell-colorCSS custom property--kui-color-textPicker cell color
--kui-calendar-picker-cell-focus-ring-colorCSS custom property--kui-color-focusPicker cell focus ring color
--kui-calendar-picker-cell-bg-activeCSS custom property--kui-color-primary-fillPicker cell background, active
--kui-calendar-picker-cell-color-activeCSS custom property--kui-color-primary-on-fillPicker cell color, active
--kui-calendar-picker-cell-color-mutedCSS custom property--kui-color-text-secondaryPicker cell color, muted
NameTypeDefaultDescription
--kui-calendar-radiusCSS custom property--kui-radius-lgCorner radius
--kui-calendar-paddingCSS custom property--kui-space-4Padding
--kui-calendar-title-font-sizeCSS custom property--kui-text-sm-sizeTitle font size
--kui-calendar-title-padding-inlineCSS custom property--kui-space-2Title padding, inline
--kui-calendar-nav-spacer-sizeCSS custom property--kui-control-height-xsNav spacer size
--kui-calendar-weekday-font-sizeCSS custom property--kui-text-xs-sizeWeekday font size
--kui-calendar-weekday-padding-bottomCSS custom property--kui-space-2Weekday padding, bottom
--kui-calendar-day-font-sizeCSS custom property--kui-text-sm-sizeDay font size
--kui-calendar-footer-gapCSS custom property--kui-space-2Footer gap
--kui-calendar-value-font-sizeCSS custom property--kui-text-xs-sizeValue font size
--kui-calendar-picker-grid-gapCSS custom property--kui-space-2Picker grid gap
--kui-calendar-picker-cell-padding-blockCSS custom property--kui-space-3Picker cell padding, block
--kui-calendar-picker-cell-padding-inlineCSS custom property--kui-space-2Picker cell padding, inline
--kui-calendar-picker-cell-radiusCSS custom property--kui-radius-smPicker cell corner radius
--kui-calendar-picker-cell-font-sizeCSS custom property--kui-text-sm-sizePicker cell font size
--kui-calendar-padding-smCSS custom property--kui-space-3Padding, sm
--kui-calendar-day-font-size-smCSS custom property--kui-text-xs-sizeDay font size, sm
--kui-calendar-weekday-font-size-smCSS custom property--kui-text-2xs-sizeWeekday font size, sm
--kui-calendar-width-smCSS custom property252pxWidth, 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.

NameTypeDefaultDescription
labelstring — Accessible name of the day grid. Default Calendar.
todaystring — Text of the footer shortcut to the current day. Default Today.
previousMonthstring — Previous button of the day view. Default Previous month.
nextMonthstring — Next button of the day view. Default Next month.
previousYearstring — Previous button of the month view. Default Previous year.
nextYearstring — Next button of the month view. Default Next year.
previousDecadestring — Previous button of the year view. Default Previous decade.
nextDecadestring — Next button of the year view. Default Next decade.

Inputs verified against @kikita-labs/ui v2.0.0 public typings.

NameTypeDefaultDescription
[(value)]KuiDateRange | nullnullSelected range, { start: Date; end: Date | null }. end is null while only the start has been picked; the first click after a committed range starts a new one.
[(viewDate)]Datecurrent monthFirst-of-month date that controls the visible month. Left unbound it defaults to today, or to the month of the bound value.start at construction.
size'md' | 'sm' | undefinedundefinedCalendar density. sm drops the border and padding for sidebars. Falls back to defaults.calendarRange.size, then the global defaults.size, then md.
flatboolean | undefinedundefinedStrips the calendar background, border and padding, for dropdown or popover panels. Falls back to defaults.calendarRange.flat, then false.
showWeekendboolean | undefinedundefinedMutes the weekend days of the locale. Falls back to defaults.calendarRange.showWeekend, then true.
showFooterboolean | undefinedundefinedShows the built-in footer with the current value and the Today shortcut. Falls back to defaults.calendarRange.showFooter, then false.
showPrevNav / showNextNavboolean | undefinedundefinedHide the previous or next header navigation control, for two linked calendars a month apart. Fall back to defaults.calendarRange, then true.
minDate / maxDateDate | undefinedundefinedInclusive lower and upper bounds. Dates outside them are disabled.
disabledDatesDate[] | ((date: Date) => boolean) | undefinedundefinedIndividual disabled dates or a predicate evaluated for each rendered date.
localestring | undefinedundefinedBCP 47 locale for month and weekday names, heading order, week start and weekend. It overrides the locale of the nearest KuiI18n level for this instance.
messagesPartial<KuiCalendarMessages> | undefinedundefinedPer-instance text overrides, the same group as the calendar. They win over scoped and root messages.
[kuiCalendarHeader] / [kuiCalendarFooter]projected content-Replace the default header or footer entirely; the built-in block (and the showFooter toggle) renders only when nothing is projected.
--kui-calendar-widthCSS custom property296pxOverrides the fixed calendar width, as for kui-calendar.
KuiDateRangeinterface-The value shape: { start: Date; end: Date | null }.
KuiCalendarOptions / KuiCalendarViewOptionsinterfaces-Shape of defaults.calendarRange (size, flat, showWeekend, showFooter, showPrevNav, showNextNav, previousIcon, nextIcon), shared with kui-calendar.

Calendar Range has the same grid semantics and roving focus as Calendar.

  • The day grid is a complete ARIA grid: role="grid", a weekday header row of columnheader cells and six week rows of seven gridcells, each wrapping one day button.
  • aria-selected sits on the gridcells of the range endpoints and any single committed day; today exposes aria-current="date" and disabled dates aria-disabled.
  • One day cell is in the tab order at a time; the arrow keys, Home, End, PageUp and PageDown move focus without leaving the grid.
  • Keyboard: ArrowLeft and ArrowRight move a day, ArrowUp and ArrowDown a week, Home and End the start and end of the week, PageUp and PageDown a month (with Shift a year), and Enter or Space selects the focused date.
  • Month and year changes are announced through an aria-live="polite" region.

Documented limits of the installed package.

  • There is no built-in popover wrapper (a range equivalent of input[kuiDatePicker]); the component is inline-only.
  • Selecting more than one start and end pair is not implemented.