Calendar
Date picker calendar for selecting single dates, multiple dates, or date ranges. Previous and next month labels, and the month dropdown text, follow the selected UI locale.
Playground
Live preview
Examples
Code
// mode: "single" | "multiple" | "range"
<Calendar mode="single" selected={date} onSelect={setDate} />
<Calendar mode="multiple" selected={dates} onSelect={setDates} />
<Calendar mode="range" selected={range} onSelect={setRange} />
// showOutsideDays: hide days from adjacent months
<Calendar mode="single" showOutsideDays={false} />Code
import { Calendar } from "@npolyhunter/ui";
export function CalendarExample() {
const [date, setDate] = React.useState<Date | undefined>(new Date());
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-md border"
/>
);
}Used in
Includes use through shared UI components.
AppBack Office
