{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "range-calendar-validation-preskok-demo",
  "registryDependencies": [
    "https://ui-three-mu.vercel.app/r/range-calendar.json",
    "https://ui-three-mu.vercel.app/r/calendar.json"
  ],
  "files": [
    {
      "path": "registry/preskok/examples/range-calendar-validation-preskok-demo.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport type { CalendarDate } from \"@internationalized/date\"\nimport { getLocalTimeZone, today } from \"@internationalized/date\"\nimport type { DateValue, RangeValue } from \"react-aria-components/RangeCalendar\"\n\nimport { RangeCalendar } from \"@/components/ui/preskok-ui/range-calendar\"\n\nexport default function RangeCalendarValidationPreskokDemo() {\n  const timeZone = getLocalTimeZone()\n  const [range, setRange] = useState<RangeValue<CalendarDate> | null>(() => ({\n    start: today(timeZone).add({ days: 2 }),\n    end: today(timeZone).add({ days: 5 }),\n  }))\n  const minTripDate = today(timeZone)\n  const maxTripDate = minTripDate.add({ months: 2 })\n\n  const isWeekend = (value: DateValue) => {\n    const day = value.toDate(timeZone).getDay()\n    return day === 0 || day === 6\n  }\n\n  return (\n    <div className=\"space-y-3\">\n      <RangeCalendar\n        value={range}\n        onChange={setRange}\n        minValue={minTripDate}\n        maxValue={maxTripDate}\n        isDateUnavailable={isWeekend}\n        aria-label=\"Validated trip dates\"\n      />\n      <p className=\"text-sm text-muted-foreground\">\n        Range must stay within 2 months and excludes weekends.\n      </p>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}