FormComponentsDate Range Picker Field

Date Range Picker Field

DateRangePickerField is a specialized reusable input component for shaddy form.

⚠️ This content is not available in your language yet.

DateRangePickerField is a specialized reusable input component for the shaddy form. It is built on top of the DateRangePicker UI component and is designed to accept a range of dates with validation and flexible configuration. Use it inside a Shaddy Form to collect a start and end date from users.

Installation

pnpm dlx shadcn@latest add https://shaddy-docs.vercel.app/r/date-range-picker-field

Props

NameTypeDefaultDescription
namestring (from react-hook-form Path)requiredThe field name (must match your form schema).
labelstringThe label displayed above the date range picker.
requiredbooleanfalseMarks the field as required.
disabledbooleanfalseDisables the date range picker when true.
classNamestringAdditional CSS classes for the field container.

Usage

<ShaddyForm>
  <DateRangePickerField name="eventDates" label="Event Dates" required />
</ShaddyForm>

Notes

  • It is built on top of the DateRangePicker UI component, so you can refer to its documentation for more customization options.