Calendar
NEWA dependency-free calendar with a selected-day pill that glides from date to date, range support with a live hover preview band, and months that slide in the direction you navigate.
October 2026
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/calendar
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| mode | 'single' | 'range' | 'single' | Selection mode |
| value | Date | null | DateRange | undefined | Controlled selected date or range |
| defaultValue | Date | null | DateRange | null | Initial selection (uncontrolled) |
| onChange | (date: Date | null) => void | (range: DateRange) => void | undefined | Selection change callback |
| defaultMonth | Date | undefined | Month shown initially |
| minDate | Date | undefined | Earliest selectable date |
| maxDate | Date | undefined | Latest selectable date |
| isDateDisabled | (date: Date) => boolean | undefined | Predicate to disable specific dates |
| weekStartsOn | 0 | 1 | 0 | First day of the week (0 = Sunday, 1 = Monday) |
| locale | string | undefined | BCP 47 locale for formatting |
| className | string | undefined | Additional class for the root |