Vishal's p
Vishal's p

Reputation: 198

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

Upvotes: 1

Views: 703

Answers (2)

Madhu
Madhu

Reputation: 1542

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.

Upvotes: 1

Yaman
Yaman

Reputation: 3991

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.

Upvotes: 4

Related Questions