I have two (2) UIDatePickers in my iPad app (XCode 4.5, Storyboards, iOS 6.0). One UIDatePicker is used for a “start” date/time, the other is for “end” time (does not show the date, just the time).
I want to be able to set the second picker (“end” time) date to equal what was selected in the “start” date/time picker.
I have looked in Google and SO, and can find nothing. How do I do this?
If on different view and controller then you need to pass the
dateto other class.For this you can use a delegate or notification.
and then use something like this
Use
[secondDatePicker setDate:firstDatePicker.date]If both are on same controller then, you can simply add an action method as :