I have a NSDatePicker and am trying to get only the hour...can this done? The web references to setting:
datePicker.datePickerMode = UIDatePickerModeTime;
but I don't see that option anywhere - it appears to be an iOS only feature. How can I do this for a desktop cocoa based app?
Use the NSDatePickerElementFlags
, which you set for your picker using setDatePickerElements:
[datePicker setDatePickerElements:NSHourMinuteSecondDatePickerElementFlag];
or
[datePicker setDatePickerElements:NSHourMinuteDatePickerElementFlag];