I am doing the application with UIDatePicker
for time format. It is working in 12hrs format, If i change the iPhone date/time to 24hrs format, I need to display only 12hrs format, not the 24hrs format.
Is there anyway to disable the 24hrs format?
I am doing the application with UIDatePicker
for time format. It is working in 12hrs format, If i change the iPhone date/time to 24hrs format, I need to display only 12hrs format, not the 24hrs format.
Is there anyway to disable the 24hrs format?
Use this code for 12 hour format
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"US"];
[self.datePicker setLocale:locale];
Use this code for 24 hour format
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"NL"];
[self.datePicker setLocale:locale];