I am using a UIDatePicker in my iPhone project. I want to show the date in the datepicker after I open it and click the “Done” button. I am using this code:
[datePicker addTarget:self action:@selector(changeDate:) forControlEvents:UIControlEventValueChanged]
changeDate is a method I defined somewhere else and I put the corresponding codes of UIControlEventValueChanged in that method. However I want to display the value in the UIDatePicker after I hit the “Done” button even if I haven’t made any changes. How can I do that?
You can use following code….