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
UIDatePicker *picker1 = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 210, 320, 216)];
[picker1 setDatePickerMode:UIDatePickerModeDate];
picker1.backgroundColor = [UIColor whiteColor];
[picker1 addTarget:self action:@selector(startDateSelected:) forControlEvents:UIControlEventValueChanged];
// [picker1 addSubview:toolBar];
self.birthTxt.inputView = picker1; // Here birthTxt is Textfield Name replace with your name