NSPredicateEditor's date picker doesn't use user's date format
NSPredicateEditor's date picker doesn't use user's date format
- Subject: NSPredicateEditor's date picker doesn't use user's date format
- From: Steve Mills <email@hidden>
- Date: Fri, 20 Feb 2015 00:17:20 -0600
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@hidden)
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:
This email sent to email@hidden