Romula Romula - 8 months ago 60
iOS Question

UIDatePicker change locale

I am trying to change locale for UIDatePicker like this:

picker.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];

It is working, but after setting locale the picker does not meet the system settings of time format. I mean 24hr/(AM/PM). What I am doing wrong?


You are not doing anything wrong. Date/time format is dictated by locale. And en_US uses 12hr AM/PM format: