Calendar
A date grid for selecting a single date, multiple dates or a range. The header opens month and year grids for fast navigation, and granularity switches the selection to whole months or years. unavailableRanges blocks booked spans, and an already-selected value that becomes blocked travels to the nearest available date.
Installation
CLI
Manual
- 1
Register the @fma-ui namespace in components.json (once)
components.json{ "registries": { "@fma-ui": "https://ui.fmartinsandre.dev.br/r/{name}.json" } } - 2
Add the item
pnpm dlx shadcn@latest add @fma-ui/calendarFiles land in
components/fma-ui/calendar.tsx; npm and registry dependencies are installed along with them.
Dependencies
- npm
- @internationalized/date@^3.12.4class-variance-authority@^0.7.1cn@^0.4.0lucide-react@^1.52.0react-aria-components@^1.21.1
- Registry
- @fma-ui/button@fma-ui/select@fma-ui/use-available-date-correction@fma-ui/date-granularity@fma-ui/interval-helpers@fma-ui/types