fma-ui

Date Field

A segmented, keyboard-editable date input. granularity also accepts "month" and "year" for month- or year-only fields. Values blocked by minValue/maxValue or unavailableRanges move to the nearest available date once the field loses focus, so typing is never interrupted. Exports DateInput for composing date pickers.

FormsoriginalRegistry JSON

Installation

  1. 1

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

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

    Add the item

    pnpm dlx shadcn@latest add @fma-ui/date-field

    Files land in components/fma-ui/date-field.tsx; npm and registry dependencies are installed along with them.

Dependencies

npm
@internationalized/date@^3.12.4cn@^0.4.0react-aria-components@^1.21.1
Registry
@fma-ui/use-available-date-correction@fma-ui/date-granularity@fma-ui/interval-helpers@fma-ui/types