Tessera UI

Calendar

Date picker calendar built on react-day-picker v9. Supports single, range, and multiple selection modes, RTL, week numbers, disabled dates, multi-month view, and an optional footer slot.

Installation

pnpm add @tessinaui/ui react-day-picker

Usage

import { Calendar } from "@tessinaui/ui";
{/* Single date */}
<Calendar mode="single" selected={date} onSelect={setDate} />

{/* Date range */}
<Calendar mode="range" selected={range} onSelect={setRange} numberOfMonths={2} />

{/* Multiple dates */}
<Calendar mode="multiple" selected={dates} onSelect={setDates} />

Playground

Preview
Loading...

Showcase

Preview
Loading...

API Reference

Calendar props

All props from react-day-picker's DayPicker are accepted in addition to the props below.

Style

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Day cell size. sm=32px, md=36px, lg=40px. Caption and weekday text scales accordingly.
width"narrow" | "default" | "wide""default"Container padding. narrow=p-2, default=p-3, wide=p-5.
rounded"none" | "sm" | "md" | "lg" | "xl" | "full""md"Border radius of the outer container.
classNamestringAdded to the outer container <div>

Selection

PropTypeDescription
mode"single" | "range" | "multiple"Selection behaviour
selectedDate | DateRange | Date[]Controlled selected value
onSelectfunctionCalled when selection changes
defaultMonthDateMonth shown on first render

Layout

PropTypeDefaultDescription
numberOfMonthsnumber1Number of months displayed side-by-side
showOutsideDaysbooleantrueShow days from adjacent months
fixedWeeksbooleanfalseAlways render 6 weeks so height stays constant
showWeekNumberbooleanfalseShow ISO week number column

Constraints

PropTypeDescription
fromDateDateEarliest selectable date
toDateDateLatest selectable date
disabledMatcher | Matcher[]Disable specific dates or ranges (e.g., (d) => d.getDay() === 0)
disableNavigationbooleanLock the month/year so the user cannot navigate

Direction

PropTypeDefaultDescription
dir"ltr" | "rtl""ltr"Text direction. RTL flips nav arrows and calendar layout automatically.

Date & Time Panel

PropTypeDefaultDescription
showDateTimebooleanfalseShow built-in Start/End date & time inputs with Apply button
dateTimeLayout"vertical" | "horizontal""vertical"vertical renders the panel below the calendar; horizontal renders it to the side
showTimebooleantrueShow time inputs alongside the date inputs
showTimezonebooleanfalseShow local timezone label below Apply button
onApply(data: CalendarApplyData) => voidFired when Apply is clicked
PropTypeDescription
footerReactNodeRendered below the calendar grid — useful for preset date buttons

CalendarApplyData type

import type { CalendarApplyData } from "@tessinaui/ui";

interface CalendarApplyData {
  start?: Date;
  startTime?: string;  // "HH:MM"
  end?: Date;
  endTime?: string;    // "HH:MM"
}

DateRange type

import type { DateRange } from "@tessinaui/ui";

interface DateRange {
  from: Date | undefined;
  to?: Date | undefined;
}

On this page