Components
Calendar
A month calendar grid for selecting dates with navigation between months.
The Calendar component renders a month view with day cells, supporting single date selection, outside-day visibility, and month navigation. It uses date-fns for date calculations and is styled with Tailwind classes matching the design system.
Preview
January 2026
Su
Mo
Tu
We
Th
Fr
Sa
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Installation
npx novaui-cli add calendarDependencies
The Calendar requires the following peer dependency:
date-fns>= 3
Import
import { Calendar } from 'novaui-components'Basic Usage
February 2026
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
import { useState } from 'react'
import { Calendar } from 'novaui-components'
export function BasicCalendar() {
const [date, setDate] = useState<Date | undefined>(new Date())
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
/>
)
}Hide Outside Days
February 2026
2
3
4
export function CalendarNoOutsideDays() {
const [date, setDate] = useState<Date | undefined>(new Date())
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
showOutsideDays={false}
/>
)
}Props API
Calendar Props
| Prop | Type | Default | Description |
|---|---|---|---|
mode | 'single' | 'range' | 'multiple' | 'single' | Selection mode |
selected | Date | Date[] | { from: Date; to: Date } | - | Currently selected date(s) |
onSelect | (date: Date | undefined) => void | - | Called when a date is selected |
showOutsideDays | boolean | true | Show days from adjacent months |
className | string | - | Additional CSS classes |
classNames | Record<string, string> | - | Custom classes for internal elements |
Best Practices
- Use with a popover or dialog — wrap the Calendar in a popover for date-picker behavior
- Show outside days for context — users often need to see the surrounding dates for orientation
- Highlight today — the calendar automatically highlights today's date with
bg-accent - Provide month navigation — the built-in prev/next buttons make it easy to browse months
Related Components
- Input — pair with a text input for a full date picker