Skip to main content

format

Description

sets the time format for a time picker input

Type

string | function

Default value

"%H:%i"

Example

<Timepicker {value} format="%g:%i %a" />

Details

You can set the format property as a string or as a function that returns a formatted string.

Check the characters available for specifying the time format.

note

The format property specifies the time format for the input of the Timepicker control. To set the 12-hour/24-hour clock format for the Timepicker dropdown, you should also use the clockFormat property of the calendar object in the applied locale.

<Locale
words={{
calendar: { clockFormat: 12 },
}}
>
<Timepicker {value} format={"%g:%i %a"} />
</Locale>

Related article: Setting the time format

Related sample: Timepicker