New! DateTimeInput is in beta, the API is subject to change. Feel free to test it out and let us know what you think!
Whether to use a 12-hour or 24-hour time format. If not specified, defaults to the browser's locale convention.
string'12'
'24'
Whether the date-time picker should always be shown or displayed via a drop when interacting with the input.
booleantrue
false
The locale string for date and time formatting. If not specified, defaults to the browser's locale.
string"en-US"
"de-DE"
"fr-FR"
Custom messages for DateTimeInput. Used for internationalization and customization of default strings and accessibility announcements.
object{
activeSection: "string",
activeSectionValue: "string",
chooseDateTime: "string",
inputLabel: "string",
invalidDateTime: "string",
openDrop: "string",
sectionDay: "string",
sectionHours: "string",
sectionMeridiem: "string",
sectionMinutes: "string",
sectionMonth: "string",
sectionSeconds: "string",
sectionYear: "string"
}The increment, in minutes, used when navigating the minutes section with the up/down arrow keys or the drop options.
number1
15
30
The name of the input. This property is required when used within a FormField.
string"appointment-time"
Callback function called when the date-time value changes. Receives an event object containing the new value in ISO 8601 format.
function(event: { value?: string }) => setValue(event.value)The background color for active date/time sections.
string"active-background"
The color of the active section indicator.
string"black"
object{ dark: "white", light: "black" }The padding inside the drop container.
string"small"
object{ vertical: "small", horizontal: "small" }The color of the divider between the Calendar and TimeInput inside the DateTimeInput drop.
string"border"
The border size of the divider between the Calendar and TimeInput inside the DateTimeInput drop.
string"xsmall"