title: How can I set Date programmatically on Date Picker? setDate is not working?
body: <p>I am using Xcode 4.</p>
  
  <p>I have DatePicker Component.</p>
  
  <p>It is taking the Default date which is set in IB's Date 
  to highlight and select the date...</p>
  
  <p>I want to set the current date in date picker to be selected...</p>
  
  <p>Not working setDate Method...</p>
  
  <pre><code> - (void)viewDidLoad
      {
          [super viewDidLoad];   
  
          [ddlDatePicker setDate:[NSDate date]];
  
          NSLog(@"-%@-",[NSDate date]);
       //NSLog is showing me the current date..Today's Date...
      //But ddlDatePicker is setted to the date on the day on which I created the date 
  //Picker...Or You can say date field in the DatePicker's IB Properties.. 
  
      ![enter image description here][1]
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/mHlD6.png" alt="enter image description here"></p>