Reputation: 531
I have a medical app that allows the user to calculate a patient's age based on date of birth entered with a date picker. For convenience, I set the default date for the date picker object in Interface Builder to 1/1/1950. However, I noticed that in iOS 5 the default date no longer sets when the date picker initially loads. The default date automatically becomes the upper date limit (if that parameter enabled in Interface Builder), or the current date if this upper limit is not enabled. The default date field in Interface Builder still has "1/1/1950" set. The same version of the app on an older device compiled with iOS 4 still works properly, with the date picker scrolling to 1/1/1950 on loading. I very much would appreciate any advice for fixing the problem. Thanks in advance.
Upvotes: 1
Views: 2037
Reputation: 8772
In your ViewController's viewDidLoad, log the value of the picker. If it is not set correctly, then you can try setting the value programmatically in viewDidLoad.
Upvotes: 1