Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Create Custom UIDatePicker Control

I need to create Custom UIDatePicker Control Displaying Only Days of week,Hours,Minutes and time Format(Am,Pm). I had just started iOS development so not having so much of idea.Any insights or reference appreciated. Thanks

like image 810
Vishal's p Avatar asked Feb 05 '13 11:02

Vishal's p


2 Answers

Look at the datePickerMode property of UIDatePicker

The different available modes are :

typedef enum {
   UIDatePickerModeTime,
   UIDatePickerModeDate,
   UIDatePickerModeDateAndTime,
   UIDatePickerModeCountDownTimer
} UIDatePickerMode;

If you need days of week, you will need to implement a basic UIPickerView and add your own data on it.

like image 75
Yaman Avatar answered Oct 14 '22 06:10

Yaman


You need to create your own customized pickers using UIPickerView. If we want to to use UIDatepicker,

Need to use date picker mode as UIDatePickerModeDateAndTime and we need to over shadow the other data which is not necessary.

like image 44
Madhu Avatar answered Oct 14 '22 07:10

Madhu