suse
suse

Reputation: 10563

How to handle time control in iPhone programming

Any idea on how to customize the UIDatePicker with single column with list of events in it,and user should be able to select one among it ? Let me know some details about it. or example related to it.

Thank You

Upvotes: 1

Views: 2017

Answers (2)

Ankit Vyas
Ankit Vyas

Reputation: 7501

You can use any of these

UIDatePickerModeDate, // Displays month, day, and year depending on the locale setting (e.g. November | 15 | 2007)

UIDatePickerModeDateAndTime,    // Displays date, hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. Wed Nov 15 | 6 | 53 | PM)

Like this

datePicker.datePickerMode = UIDatePickerModeDateAndTime;

Upvotes: 1

Michael Kessler
Michael Kessler

Reputation: 14235

In code:
UIDatePicker has the datePickerMode property exactly for this reason.
You can set it with UIDatePickerModeTime.

In Interface Builder:
The top property in Date Picker Attributes window is Mode - choose Time.

Upvotes: 4

Related Questions