# DateTimeRangePicker

An ordered civil date/time range with four atomic form values.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, DateTimeRangePicker } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <DateTimeRangePicker label="Booking" startDateName="startDate" startTimeName="startTime" endDateName="endDate" endTimeName="endTime"
        defaultValue={{start:{date:"2026-10-27",time:"09:00"},end:{date:"2026-10-27",time:"18:00"}}} required />
    </FloodRoot>
  );
}
```

## Design notes

- Incomplete and reversed ranges do not contribute accepted values.
- No timezone or timestamp inference. Server availability remains host owned.
- Only range and endpoint headings are visible; individual field names remain accessible.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `hideLabel` | `boolean` | `—` |
| `value` | `DateTimeRangeValue` | `—` |
| `defaultValue` | `DateTimeRangeValue` | `—` |
| `onValueChange` | `(range: DateTimeRangeValue) => void` | `—` |
| `startDateName` | `string` | `—` |
| `startTimeName` | `string` | `—` |
| `endDateName` | `string` | `—` |
| `endTimeName` | `string` | `—` |
| `startLabel` | `string` | `—` |
| `endLabel` | `string` | `—` |
| `startDateLabel` | `string` | `—` |
| `startTimeLabel` | `string` | `—` |
| `endDateLabel` | `string` | `—` |
| `endTimeLabel` | `string` | `—` |
| `form` | `string` | `—` |
| `required` | `boolean` | `—` |
| `disabled` | `boolean` | `—` |
| `readOnly` | `boolean` | `—` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
| `precision` | `"minute" \| "second"` | `—` |
| `order` | `DateFieldProps["order"]` | `—` |
| `locale` | `string` | `—` |
| `minDate` | `string` | `—` |
| `maxDate` | `string` | `—` |
| `step` | `number` | `—` |
| `interval` | `number` | `—` |
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
| `description` | `string` | `—` |
| `incompleteMessage` | `string` | `—` |
| `reversedMessage` | `string` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "defaultValue" \| "onChange">` | `Forwarded` |
