Cannot change the 24-hour/12-hour format for UIDatePicker on iOS 16.5.1

50 views Asked by At

I was use the UIDatePicker on iOS with following snipe to show 24-hour format (override user's setting) and it works fine until iOS16.5.1

    myDatePicker.locale = Locale(identifier: "en_GB")

why I used this? it is explained here

I tried the hourCycle property (introducing on iOS 16) here but no luck.

Any suggestion?

0

There are 0 answers