Date time picker
A date time picker lets users select a date and a time.
Install
One package and one stylesheet. The stylesheet holds the tokens every component uses.
pnpm add @wolf-rayet/reactimport '@wolf-rayet/react/css/wolf-rayet.css';
import { DateTimePicker } from '@wolf-rayet/react';Props
A required prop is marked with an asterisk.
| Prop | Type | Default | Description |
|---|---|---|---|
| label * | string | None | Says what the date and time are for. It is required, because a date on its own does not explain itself. |
| onChange | (value: string) => void | None | Called with the chosen value when it changes. |
Accessibility
What the component does for you, and what it needs from you.
- The native control uses the platform behaviour and the user’s locale. A custom picker cannot match that.
- The component requires a label, because a date and time with no name mean nothing to people.
- If a timezone applies, write it out. People cannot tell it from the control.