{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "date-field-controlled-example",
  "title": "Date Field Controlled",
  "description": "date-field-controlled-example",
  "dependencies": [
    "@internationalized/date",
    "@react-aria/i18n"
  ],
  "registryDependencies": [
    "https://intentui.com/r/date-field",
    "https://intentui.com/r/field"
  ],
  "files": [
    {
      "path": "src/components/examples/date-and-time/date-field/date-field-controlled-example.tsx",
      "content": "'use client'\n\nimport type { CalendarDate } from '@internationalized/date'\nimport { getLocalTimeZone, parseDate, today } from '@internationalized/date'\nimport { useDateFormatter } from '@react-aria/i18n'\nimport { useState } from 'react'\n\nimport { DateField, DateInput } from '@/components/ui/date-field'\nimport { Label } from '@/components/ui/field'\n\nexport default function DateFieldControlledDemo() {\n  const now = today(getLocalTimeZone())\n  const [value, setValue] = useState<CalendarDate>(parseDate(now.toString()))\n\n  const formatter = useDateFormatter({ dateStyle: 'full' })\n\n  return (\n    <div className=\"space-y-3\">\n      <div className=\"divide-y [&_p]:py-2\">\n        <p>{value ? formatter.format(value.toDate(getLocalTimeZone())) : '--'}</p>\n        <p>{value ? value.toString() : '--'}</p>\n      </div>\n      <DateField value={value} onChange={(newValue) => setValue(newValue!)}>\n        <Label>Event date</Label>\n        <DateInput />\n      </DateField>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/date-field-controlled-example/page.tsx"
    }
  ],
  "type": "registry:page"
}