NimUI
ComponentsForms

DateTimePicker

Date and time controls for scheduling, publish times, and SLA windows

DateTimePicker extends the existing date picker model with time selection while keeping values as Date objects. Hidden form inputs serialize selected dates as ISO strings.

Import

import { DateTimePicker, DateTimeRangePicker } from '@nim-ui/components';

Single Date And Time

Publish Time
Code
<DateTimePicker value={publishAt} onChange={setPublishAt} name="publishAt" />

Date And Time Range

SLA Window
Code
<DateTimeRangePicker
  value={window}
  onChange={setWindow}
  fromName="windowStart"
  toName="windowEnd"
/>

Buddhist Era Scheduling

Display Thai Buddhist Era dates without changing the submitted value. The component still returns a JavaScript Date, and hidden inputs remain ISO strings.

Thai Publish Time
Code
<DateTimePicker
  value={publishAt}
  onChange={setPublishAt}
  calendar="buddhist"
  dateFormat="yyyy-MM-dd"
  name="publishAt"
/>

// Visible: 2569-06-16 10:00
// Hidden input: 2026-06-16T03:00:00.000Z (depending on local timezone)

Operational Form Demo

Scheduling Review Form
OwnerOperations

Scheduling controls

Operational inputs for cutoff times, SLA windows, routing, and review.

Operations
priority

Props

NameTypeDefaultDescription
valueDate-Controlled selected date and time
defaultValueDate-Uncontrolled initial date and time
onChange(date: Date | undefined) => void-Called with the combined Date value
dateFormat'short' | 'medium' | 'long' | 'full' | 'iso' | string'PPP'Preset or date-fns format for the trigger label
calendar'gregory' | 'buddhist''gregory'Display years as Gregorian CE or Buddhist Era; values remain Date objects
localeLocale | string-Display locale. String locales use Intl; date-fns Locale objects also localize the calendar UI
formatDate(date: Date) => string-Custom display formatter for product-specific policies
timeStepnumber15Minute interval for time choices
namestring-Hidden input name for ISO form submission

On this page