title: How to display UIDatePicker if user hit the UITextfield Programmatically
body: <p>I'd like to Display UIDatePicker only when user the UITextField is Clicked. When the date is picked, it should be shown in the same UITextField.I want to implement UIDatePicker programmatically.I know how to write the  code of UITextField Programmatically.
  I even don't know how to call the UIDatePicker.</p>
  
  <p>Date of <strong>Birth.m</strong></p>
  
  <pre><code>UITextField txtDOB=[[UITextField alloc]initWithFrame:CGRectMake(10, 190, 300, 20)];
  
  txtDOB.borderStyle=UITextBorderStyleNone;
  
  txtDOB.backgroundColor=[UIColor clearColor];
  
  [txtDOB setUserInteractionEnabled:NO];
  
  txtDOB.font=[UIFont systemFontOfSize:14.0];
  
  txtDOB.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
  
  txtDOB.textAlignment=NSTextAlignmentLeft;
  
  txtDOB.delegate=self;
  
  [self.view addSubview:txtDOB];
  </code></pre>