KK M KK M - 1 year ago 106
iOS Question

How to show only seven days from now in UIDatePicker in iOS?

I need to show only seven days from now. How to achieve this using UIDatePicker and how we set minimum and maximum dates to UIDatePicker. Thanks in advance.

Answer Source
[datePicker setMinimumDate:[NSDate date];
[datePicker setMaximumDate:[[NSDate date] dateByAddingTimeInterval:60*60*24*6]];

He wants only seven days including current date.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download