Possible Duplicate:
How to customize the UIDatePicker
I need to customize UIDatePicker as we do support a variety of date formats like
dd-MM-yyyy, dd-MM-yyyy HH:mm:ss, dd-MM.
E.g. in “date and time” picker mode, there is no roller for year part in picker.Hence the provided picker modes are not sufficient.
Is there any way to customize a datepicker for the desired formats.
Absolutely!
You cannot do this with
UIDatePickeras it only supports 4 date formats, according to the UIDatePicker Class Reference; however you can with aUIPickerView.You will need to need to implement
UIPickerViewDelegatemethods and provide them with a data source, just like you would with aUITableView:Reference: here