Any way to fix this? My system short date format is yyyy/MM/dd, but the picker
always uses MM/dd/yyyy. I tried:
NSDatePicker* picker = (NSDatePicker*)[vals lastObject];
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
// The template just says which components to use, not the order:
[formatter setLocalizedDateFormatFromTemplate:@"yyyy/MM/dd"];
picker.formatter = formatter;
If I then log the formatter, it's still the wrong format:
Printing description of formatter->_attributes:
{
dateFormat = "MM/dd/yyyy";
formatterBehavior = 1040;
}
Shouldn't setLocalizedDateFormatFromTemplate be getting the format from my
system prefs?
--
Steve Mills
Drummer, Mac geek
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]