fma-ds

Date Field

A segmented, keyboard-editable date input.

FormsoriginalMITChangelogRegistry JSON

Overview

  • Granularity: granularity also accepts "month" and "year" for month- or year-only fields.
  • Availability: values blocked by minValue/maxValue or unavailableRanges move to the nearest available date once the field loses focus, so typing is never interrupted.
  • `DateInput`: exported for composing date pickers.

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/date-field

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

Dependencies

npm
@internationalized/date@^3.12.4cn@^0.5.0react-aria-components@^1.22.1
Registry
@fma-ds/use-available-date-correction@fma-ds/date-granularity@fma-ds/interval-helpers@fma-ds/types