UIDatePicker doesn't follow NSLocale for YYYY-MM-dd

Originator:tekjew
Number:rdar://13386320 Date Originated:09-Mar-2013 05:43 PM
Status:Open Resolved:
Product:iOS Product Version:6.1.2
Classification:Other Bug Reproducible:Always
 
Summary:
When the NSLocale specifies YYYY-MM-dd for the NSDateFormatterShortStyle and NSDateFormatterMediumStyle, UIDatePicker doesn't display in this order and instead shows Day | Month | Year.

Steps to Reproduce:
General -> International -> Region Format -> Canada (or UK)

	NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
        dateFormatter.locale = [NSLocale currentLocale];
	dateFormatter.dateStyle = NSDateFormatterShortStyle;
	NSLog(@"The date format is %@", dateFormatter.dateFormat);

Note that this code snippet prints YYYY-MM-dd. This is as per ISO 8601 and correct.

Expected Results:
UIDatePicker uses Year | Month | Day for its column ordering.

Actual Results:
UIDatePicker uses Day | Month | Year for its column ordering.
I can't determine any call to NSLocale which, while configured as above, shows dd-MM-YYYY.

The result is that any app which both inputs via UIDatePicker and outputs (via formatting with an NSDateFormatter using the [NSLocale currentLocale]) dates necessarily provides an inconsistent user experience.

Regression:
Tested only on iOS 6.1.2

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!