fma-ds

Calendar

A date grid for selecting a single date, multiple dates or a range.

FormscustomizedMITChangelogRegistry JSON

Overview

  • Navigation: the header opens month and year grids for fast navigation.
  • Granularity: granularity switches the selection to whole months or years.
  • Availability: unavailableRanges blocks booked spans, and an already-selected value that becomes blocked travels to the nearest available date.

Installation

  1. 1

    Register the @fma-ds namespace in components.json (once)

    components.json
    {  "registries": {    "@fma-ds": "https://ds.fmartinsandre.dev.br/r/{name}.json"  }}
  2. 2

    Add the item

    pnpm dlx shadcn@latest add @fma-ds/calendar

    Files land in components/fma-ds/calendar.tsx; npm and registry dependencies are installed along with them.

Dependencies

npm
@internationalized/date@^3.12.4class-variance-authority@^0.7.1cn@^0.5.0lucide-react@^1.61.0react-aria-components@^1.22.1
Registry
@fma-ds/button@fma-ds/select@fma-ds/use-available-date-correction@fma-ds/date-granularity@fma-ds/interval-helpers@fma-ds/types