API Reference
Detailed documentation for the DateTimePicker component props.
DateTimePicker
The main component for selecting dates and times.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | DateTimeValue | null | null | The current value of the picker. |
| onChange | (value: DateTimeValue) => void | - | Callback fired when a date is selected. |
| timezone | string | Asia/Kolkata | IANA timezone identifier (e.g., 'America/New_York'). |
| showTime | boolean | true | Whether to show the time picker. |
| dateFormat | string | DD | Luxon date format string. |
| timeFormat | string | HH:mm | Luxon time format string. |
| minDate | Date | string | - | Minimum selectable date. |
| maxDate | Date | string | - | Maximum selectable date. |
| placeholder | string | Select... | Input placeholder text. |
| disabled | boolean | false | Disables the picker. |
| showTimezoneSelector | boolean | false | Shows a dropdown to switch timezones. |
| className | string | - | Additional CSS class for the wrapper. |
DateTimeValue
The value object returned by the onChange callback.
| Property | Type | Description |
|---|---|---|
| dateTime | DateTime | The Luxon DateTime object. |
| iso | string | ISO 8601 string representation. |
| formatted | string | Formatted string based on dateFormat and timeFormat. |
| timestamp | number | Unix timestamp in milliseconds. |