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
  • 40

3 Answers3

8

Just set the date pickers mode.

datePicker.datePickerMode = UIDatePickerModeDate;

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

NJones
  • 27,139
  • 8
  • 70
  • 88
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
  • 1,007
  • 8
  • 15
0

UIDatePicker Class Reference Refer this

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