Skip to Content
Selection & Dates@hacline/ui/calendar

Calendar

Select dates from a monthly calendar grid.

Usage

This example synchronizes the selected ISO date with value and onValueChange. Use mode to enable multiple or range selection, or compose the calendar grid and month navigation buttons independently.

December 2026

SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
Selected date: 2026-12-12

Date Range Selection

Select a start date and an end date in sequence. This example requires at least three days and marks December 13 as unavailable.

December 2026

SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112

Parts

PartDescription
CalendarDay
A day. Shows the day of the month unless it has children; arrow keys move between days.
CalendarGrid
One month's grid, a table. offset picks which of the months shown, from 0. Without children it renders its weekdays and weeks.
CalendarHeading
The months shown, like "October 2026". Screen readers hear it change.
CalendarMonthSelect
A native select of the months, in the locale, that turns the first month shown.
CalendarNext
Shows the month after. Named "Next month"; pass aria-label in another language.
CalendarPrevious
Shows the month before. Named "Previous month"; pass aria-label in another language.
CalendarWeekday
A weekday's column header. Shows its name in weekdayFormat unless it has children.
CalendarWeekdays
The header row of weekday names, a weekday in each column. Its children can be a function of the column's index that renders it, like (index) => <CalendarWeekday index={index} className="…" />.
CalendarWeeks
The weeks of the grid's month, a row each, with a day in each cell. Its children can be a function of a cell that renders its day, like (cell) => <CalendarDay value={cell.date} className="…" />. A cell that shows nothing stays an empty cell.
CalendarYearSelect
A native select of the years from min to max, or 10 either side of the year shown.

Props

Prop

Type

View UI SDK parts and state attributes.