Change the format of a timePicker

Is it possible to change the format of a timePiker, for example it is currently displayed in 12 hour format, but I would like to change it to a 24 hour format.?,

TimePicker depend on your locale. So if you if you want to use 24 hour format change jmix.core.available-locales to one that uses it. For example for English United Kingdom locale uses 24 hour format (en_GB).

Most likely you will have to rename messages_en.properties to messages_en_GB.properties

1 Like

Is there a way to configure the TimePicker to 24-hour format, without having to change the location to English Unite Kingdom?

Maybe you did not understand me correctly. If you want to use 24 hour format use proper Locale.

For English language it is Unite Kingdom locale. For other languages there probably other locales with 24 hour format.

I don’t understand what you want.

I am currently working with an application in Spanish, that is, my message properties have the following name “messages_es_EC”, and changing the location to the United Kingdom works, but I would like to change the TimePicker format to 24 hours without changing the region. Is there any way to do it?

es_EC means you are using Ecuador locale for Spanish language. If timePiker shows in 12-hour format, probably Ecuador uses 12-hour format. If you wana use Spanish language with 24-hour timePicker, consider picking another locale. Maybe Spain es_ES