Skip to content

Components · Date, time and scheduling

DateTimePicker

A date and a wall-clock time in one field: DatePicker plus a typed 12- or 24-hour time, a step and a time-zone slot.

@rookcom/monarch-react/schedulingComponent

Interview time with a time zone

IST

Value: 2026-11-10T14:30

Usage examples

12-hour clock (en-US) and sizes

Disabled

Purpose

Collects a moment such as a meeting, interview or scheduled send as a date plus a wall-clock time. The value is YYYY-MM-DDTHH:mm, the same string as <input type="datetime-local">, so it is never converted between time zones by accident; the zone it belongs to is shown in the timeZone slot. Import from @rookcom/monarch-react/scheduling.

Use when

  • Scheduling a meeting, an interview, a reminder or a send time.
  • Any form that today uses type="datetime-local".

Avoid when

  • Only a date: use DatePicker.
  • Choosing among offered slots (booking): show the slots as buttons instead of free entry.
  • A length of time: use DurationInput.

Design principles

  • Wall-clock values only: the component never converts zones. The product converts to UTC with the zone it shows.
  • The clock follows the locale (12 or 24 hours) and accepts either when typed.
  • Picking a date keeps the time; picking a date before any time uses defaultTime.
  • On the boundary day of min or max, a picked date clamps the time into range; a typed out-of-range time is explained, not silently changed.

API reference

import { DateTimePicker } from '@rookcom/monarch-react/scheduling';
ExportKindRenderingRoot class
DateTimePickercomponentclient.mn-date-time-picker

The ref goes to the root role="group" element.

The date part is a DatePicker; its messages can be translated through the same messages prop.

Generated from the TypeScript declarations of packages/react/src/components/scheduling/date-time-picker.

Properties

value/onValueChange (controlled) or defaultValue, as YYYY-MM-DDTHH:mm or null.

min/max are date-times; days outside are disabled, times outside on the boundary day are rejected.

timeZone is a slot: a label ("IST", "Europe/London") or a time-zone select.

onValidationChange reports the date part’s errors, invalid-time, or null.

DateTimePicker

A date and a wall-clock time in one field: a DatePicker plus a typed time in the locale's 12- or 24-hour clock, with arrow-key steps and a slot for the time zone. The value is `YYYY-MM-DDTHH:mm`, the same as `<input type="datetime-local">`, so it never shifts with the device's zone.

PropTypeDescription
childrenReactNode
classNamestring
defaultTimestringTime used when a date is picked before any time, `HH:mm`. Default `'09:00'`.
defaultValuestring | nullInitial value (uncontrolled).
disabledboolean
hourCycleHourCycle12- or 24-hour clock. Default: from the locale.
idstring
invalidbooleanMarks both parts invalid. Inside a Field, the Field's `invalid` is used.
isDateDisabled((date: IsoDate) => boolean)Blocks extra dates (weekends, holidays).
localestringBCP 47 locale for typing, display and the calendar. Default: the runtime's.
maxstringLatest allowed value.
messagesPartial<DateTimePickerMessages>Text for translation.
minstringEarliest allowed value, `YYYY-MM-DDTHH:mm`. Earlier days are disabled and earlier times on that day rejected.
namestringSubmits the value (`YYYY-MM-DDTHH:mm`) under this name in a form.
onValidationChange((error: DateTimeValidationError | null) => void)Called when the built-in validation result changes (`null` when valid).
onValueChange((value: IsoDateTime | null) => void)Called with a new valid value, or `null` when the date is cleared.
presetsreadonly DatePickerPreset[]Date quick picks (see DatePicker). The time is kept.
readOnlyboolean
requiredboolean
size"sm" | "md" | "lg"Control height. Default `md`.
stepnumberMinutes the time moves with the Up and Down arrow keys. Default 15.
timeZoneReactNodeThe time zone the value is in, shown after the time: a label such as "IST" or "Asia/Kolkata", or a time-zone select. The picker itself never converts between zones.
todaystringToday's date. Default: the device's.
valuestring | nullThe wall-clock date and time (controlled), `YYYY-MM-DDTHH:mm`, or `null`. No time zone: see `timeZone`.
weekStartsOnWeekdayFirst day of the calendar week. Default: from the locale.

Variants

PropValuesDescription
hourCycle'12''24'Clock format. Default: from the locale.
step'minutes'How far ↑ and ↓ move the time, snapping to multiples. Default 15.
size'sm''md''lg'Control height. Default md.
timeZone'none''label''control'Shown after the time.

States

StateExposed asBehaviour
Empty–Placeholders show the date format and an example time.
Invalid timearia-invalid="true" on the time inputUnreadable, or outside min/max on that day; a message explains it.
Invalid datearia-invalid="true" on the date inputAs DatePicker.
Disableddisabled, data-disabledBoth parts.

Interaction behaviour

  • The date part behaves as DatePicker (typing, calendar, presets, clear). Clearing the date clears the value.
  • The time is read on blur and Enter: 14:30, 2:30 pm, 2pm, 1430, 9.15 all work.
  • ↑ and ↓ in the time move to the next or previous multiple of step, wrapping at midnight on the same day.
  • Typing a time before a date uses today (or the min day if later).

Keyboard support

KeysAction
TabDate field, its buttons, then the time field.
↑ / ↓ (time)Later / earlier by step minutes.
Enter (time)Read the typed time.
↓ (date)Open the calendar (see DatePicker).

Accessibility

Role
group containing two textboxes
Accessible name
The group is named by FieldLabel (or aria-label); the parts are "<label> date" and "<label> time".
  • Each part gets aria-invalid and its own error, linked with aria-describedby.
  • The time zone is visible text next to the time, not only a tooltip.
  • Inside a Field, the label, required state and description apply to both parts.

Responsive behaviour

  • Date and time sit in one row and wrap when the container is narrow; on phones the date takes the full width with the time and zone below.
  • The calendar popover follows DatePicker’s phone layout.

Theme support

  • Input tokens for both parts; every theme and more-contrast mode applies.
  • No motion of its own; the calendar respects reduced motion.

Do and don't

Do

  • Always show the zone the value is in with timeZone, and convert to UTC on the server with that zone.
  • Use step that matches the product’s slots (15 or 30 minutes for meetings).

Don't

  • Do not pass new Date().toISOString() (UTC) as the value; use the wall-clock string in the shown zone.
  • Do not hide the time part for all-day events; use DatePicker instead.

Dependencies

KindDepends on
npm packagesreact
Monarch componentsField, DatePicker

Testing coverage

  • Labelled group with "date" and "time" parts and the zone slot; axe clean.
  • 12-hour clock for en-US and through hourCycle.
  • Typed times in either clock, on Enter and blur.
  • ↑/↓ step and snap to multiples.
  • Picking a date first uses defaultTime; typing a time first uses today.
  • Unreadable time flagged without changing the value; onValidationChange.
  • min/max: days disabled, time clamped on the boundary day, typed times and dates rejected with messages.
  • Clearing the date clears the value; controlled value; hidden input; aria-label without Field; disabled.
CheckCovered
Axe in jsdomYes
Server renderingYes
Browser suitesVisual baselines: /__gallery/date-time-picker; Cross-browser axe: /components/date-time-picker

Tests: packages/react/src/components/scheduling/date-time-picker