3

The default UIDatePicker shows both the date and time. I need to show only the month, day and year like this:

enter image description here

How can I change the picker to this?

Gurumoorthy Arumugam
  • 2,129
  • 1
  • 25
  • 38

3 Answers3

8

Just set the date pickers mode.

datePicker.datePickerMode = UIDatePickerModeDate;

"Date" is also an option in the inspector in IB.

NJones
  • 27,039
  • 7
  • 69
  • 87
0

Did you check the page where the second image is there ?

Date Picker for iPhone Web Application

seems like it has answer to your question!

Community
  • 1
  • 1
tamilsweet
  • 997
  • 7
  • 14
0

UIDatePicker Class Reference Refer this

Ravi Kumar Karunanithi
  • 2,045
  • 2
  • 19
  • 41