Components
DateTimePicker
Combined date and time field that selects a single Date with both day and time of day.
DateTimePicker pairs a DatePicker with a
TimePicker to capture a single Date that
carries both the day and the time of day. It is controlled: value is a Date | undefined and onChange returns the combined date-time. Use it for scheduling
events, deadlines, or reminders.
Example
Preview
import { DateTimePicker } from '@officina/ui';
import { useState } from 'react';
function MeetingTime() {
const [value, setValue] = useState<Date | undefined>();
return <DateTimePicker value={value} onChange={setValue} placeholder="Pick date & time" />;
}API
| Prop | Type | Default | Description |
|---|---|---|---|
| onChange* | (value: Date | undefined) => void | — | Called with the newly selected date-time. |
| value* | Date | undefined | — | Selected date-time, or `undefined` when empty (controlled). |
| placeholder | string | — | Placeholder text when nothing is selected. |