Hi, I have difficulties with a new ion-datetime in Ionic 6. We used ion-datetime with displayFormat=“HH:mm” to allow users set some duration. But in a new version displayFormat is not available anymore and when I use something like <ion-datetime presentation="time"></ion-datetime>
there is AM/PM that I want to hide. The documentation says that these options are optional, but I cannot find how to disable them, could you please help me with that?
Are you using a specific locale? by default the time is in h24 format, so we don’t see AM/PM.
Otherwise add the attribute hourCycle=“h24”
@argCedric Hmm, that’s strange, it looks like hourCycle=“h24” does not work for me.
This is my component:
<ion-item lines="none">
<ion-datetime presentation="time" hourCycle="h24"></ion-datetime>
</ion-item>
but anyway I see this
but when I set hourCycle=“h23” it works
anyway thanks for the answer! 23h format should be enough
P.S. now it’s clear why 24h does not work