In my application i am using pickerview
My problem is that when in iOS 4.3 Picker view comes MM-dd-yy format,
In iOS 5.1 display UIDatePicker as it is in 4.3
Your and mine both of code is same but in my application UIDatePicker display
with MM-dd-yyyy
Use it ...may be helpful for you.
self.DatePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 0, 320, 216)];
self.DatePicker.datePickerMode = UIDatePickerModeDate;
[self.DatePicker addTarget:self
action:@selector(SetDatePickerTime:)
forControlEvents:UIControlEventValueChanged];
[self.asheet addSubview:self.DatePicker];