title: Problem with date picker code
body: <p>I recently added a feature to my medical app that calculates a patient's age from an entered date. If the age is zero, then the date picker displays January 1, 1950 as a default starting date for entry of the date of birth. The code works fine on iOS 4.0+ on iPhone and iPad hardware. However, when testing just prior to submission for an app update, I found the date picker crashing on my first-generation iPod, which I keep for testing iOS 3.1.3. I narrowed down the following code as the culprit, which sets the default date for the date picker:</p>
  
  <pre><code>    if (age == 0) {
          NSDateFormatter *myFormatter = [[NSDateFormatter alloc] init];
          [myFormatter setDateFormat:@"M/d/yy"];
          NSDate *initialDate = [myFormatter dateFromString:@"January/01/1950"];
          [picker setDate:initialDate animated:YES];
      }
  </code></pre>
  
  <p>The log from the iPod shows the following two lines after the crash:</p>
  
  <pre><code>&lt;Warning&gt;: *** Assertion failure in -[UIDatePickerView _updateBitsForDate:andReload:animateIfNeeded:], /SourceCache/UIKit/UIKit-984.38/UIDatePicker.m:908
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;Error&gt;: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: date'
  </code></pre>
  
  <p>I would appreciate any help in understanding why this crash occurs only on the older device, and how to solve the issue. Thanks in advance.</p>