v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
DateRangePicker
Two labeled date inputs with interval validity.
Interactive preview
Usage
import { DateRangePicker } from "@devvy-ui/react";
<DateRangePicker label="Travel dates" name="travel" required />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue | readonly [string, string] | ['', ''] | ISO start and end dates. |
| onValueChange | (range) => void | — | Interval callback. |
| min / max / required | native constraints | — | Applied to both date inputs. |
Accessibility & behavior
Platform Behavior & Guidelines
Submits travel-start/travel-end. End-date native minimum follows the start; custom validity also rejects reversed intervals. Controlled ranges remain application owned.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add date-range-pickerMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
DateRangePicker.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.