Skip to content

Components

Calendar

A month grid for a date or a range, and a Date Picker that opens it from a button.

Customize
Ombelle · light

Installation

Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.

pnpm dlx @ombelle-ui/cli@1.1.2 add calendar

Adds components/ui/calendar.tsx and installs react, @radix-ui/react-popover, date-fns, @date-fns/tz, clsx, tailwind-merge, react-day-picker, lucide-react with lifecycle scripts disabled. This is a client component.

In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.

Usage

example.tsx
import { Calendar, DatePicker } from '@/components/ui/calendar'
export function Example(){return <div style={{ display: "grid", gap: "1rem" }}><Calendar mode="range" defaultMonth="2026-11-01" selected={{ from: '2026-11-12', to: '2026-11-18' }} aria-label="Stay" /><DatePicker aria-label="Due date" name="due" calendar={{ disablePast: true }} /></div>}

API and states

API
Calendar (mode single or range, selected, onSelect, defaultMonth, disabled, disablePast, weekStartsOn, locale, numberOfMonths, today), DatePicker (value, defaultValue, onValueChange, mode, placeholder, format, locale, name, calendar), toIsoDate, fromIsoDate, formatDate
Minimum states
Today, selected, range start, middle and end, outside the month, disabled, picker open
Native basis
react-day-picker; Radix Popover, or Base UI Popover in the Base UI edition, for the Date Picker
Styles
Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.