API Reference

Detailed documentation for the DateTimePicker component props.

DateTimePicker

The main component for selecting dates and times.

PropTypeDefaultDescription
valueDateTimeValue | nullnullThe current value of the picker.
onChange(value: DateTimeValue) => void-Callback fired when a date is selected.
timezonestringAsia/KolkataIANA timezone identifier (e.g., 'America/New_York').
showTimebooleantrueWhether to show the time picker.
dateFormatstringDDLuxon date format string.
timeFormatstringHH:mmLuxon time format string.
minDateDate | string-Minimum selectable date.
maxDateDate | string-Maximum selectable date.
placeholderstringSelect...Input placeholder text.
disabledbooleanfalseDisables the picker.
showTimezoneSelectorbooleanfalseShows a dropdown to switch timezones.
theme'light' | 'dark'lightColor theme of the picker.
orientation'portrait' | 'landscape'portraitLayout orientation.
selectionMode'single' | 'range'singleDate selection mode.
rangeValueDateTimeRangeValue | nullnullThe current range value (when selectionMode='range').
onRangeChange(value: DateTimeRangeValue) => void-Callback fired when range changes.
use24HourbooleanfalseUse 24-hour format for time picker.
ariaLabelstring-ARIA label for accessibility.
classNamestring-Additional CSS class for the wrapper.

DateTimeValue

The value object returned by the onChange callback.

PropertyTypeDescription
dateTimeDateTimeThe Luxon DateTime object.
isostringISO 8601 string representation.
formattedstringFormatted string based on dateFormat and timeFormat.
timestampnumberUnix timestamp in milliseconds.

DateTimeRangeValue

The value object returned by the onRangeChange callback.

PropertyTypeDescription
startDateTimeValueStart date of the range.
endDateTimeValueEnd date of the range.
nightsnumberNumber of nights in the range.