Viana Kitv0.1.4

Components

Calendar

A date picker built on top of React DayPicker. Supports single date, date range, and custom disabled states.

example.tsx
April 2026

Import

tsx
import { AppCalendar } from "@/components/primitives/AppCalendar"

Examples

Date range

Set mode="range" and numberOfMonths={2} to let users select a start and end date across two months.

example.tsx
April 2026
May 2026

Date picker

Combine with AppPopover and a trigger button to build a compact date picker input.

example.tsx

With presets

Add quick-select buttons above the calendar for common relative dates like "Today" or "In a week".

example.tsx

Booked dates

Pass an array of Date objects to the disabled prop to mark specific days as unavailable.

example.tsx
April 2026

Week numbers

Enable showWeekNumber to display ISO week numbers alongside each row — useful for project planning contexts.

example.tsx
April 2026
14
15
16
17
18

API Reference

AppCalendar passes all props through to React DayPicker. Key props are listed below.

PropTypeDefaultDescription
mode"single" | "range" | "multiple""single"Selection mode.
selectedDate | DateRange | Date[]The currently selected date(s).
onSelectfunctionCallback fired when the selection changes.
disabledDate[] | MatcherDates or matchers that cannot be selected.
numberOfMonthsnumber1Number of months to display side by side.
showOutsideDaysbooleantrueShow days from adjacent months.
showWeekNumberbooleanfalseDisplay ISO week numbers.
initialFocusbooleanfalseFocus the calendar on mount — use inside popovers.
classNamestringAdditional Tailwind classes on the root element.

Source

src/components/primitives/AppCalendar.tsx
"use client"

import { Calendar } from "../ui/calendar"

function AppCalendar(props: React.ComponentProps<typeof Calendar>) {
  return <Calendar {...props} />
}

export { AppCalendar }