I tested Apple's DateCell sample, it shows as left below, then I modified code so it shows like at right.
I want to let Date Picker View also shows in "yyyy/MM/dd" format, what can I do?
I want to let Date Picker View also shows in "yyyy/MM/dd" format, what can I do?
Code:
- (void)viewDidLoad
{
self.dataArray = [NSArray arrayWithObjects:@"Start Date", @"End Date", nil];
self.dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[self.dateFormatter setDateStyle:NSDateFormatterShortStyle];
[self.dateFormatter setTimeStyle:NSDateFormatterNoStyle];
[self.dateFormatter setDateFormat:@"yyyy/MM/dd"];
}