I have a dataPicker in my application. But it shows only a month, a day, an hour. How can I add a year to the date picker. Any idea?
datePicker.datePickerMode = UIDatePickerModeDate;
UIDatePickerModeDateDate selection shows months, days of the month, and years. The exact order of these elements depends on the locale setting. An example of this mode [November | 15 | 2007]. Available in iOS 2.0 and later. Declared in UIDatePicker.h.
UIDatePickerModeDate
Date selection shows months, days of the month, and years. The exact order of these elements depends on the locale setting. An example of this mode [November | 15 | 2007].
Available in iOS 2.0 and later. Declared in UIDatePicker.h.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDatePicker_Class/Reference/UIDatePicker.html
You can also go from the storyboard mode: (see screenshot)
If you want to add a month, date, year , and also , add one selector that uses dates only using (UIDatePickerModeDate) and extra for time (UIDatePickerModeTime).