Master_Tushar
Master_Tushar

Reputation: 134

How to Change UIDatepicker Components from Day/Month/Year to Year/Month/Day

Whenever we use UIDatePicker as Date Mode. it show as

Image of DMY Mode DatePicker

Where first we have to choose the Day/Month/Year (from left to right)

My requirement is Year/Month/Day (from left to right).

Upvotes: 3

Views: 5675

Answers (1)

Yuyutsu
Yuyutsu

Reputation: 2527

In Apple's documentation they specified that in UIDatePickerModeDate. The DatePicker displays months, days of the month, and years. The exact order of these items depends on the locale setting. An example of this mode is [ June | 18 | 2013 ]. But In device it display as DD/MM/YYYY. See UIDatePicker for more info.

So if you want to do it yourself you could create your own UIPickerView with the values you want. It might helps you create you own UIPickerView

Upvotes: 3

Related Questions