KK M KK M - 5 months ago 10
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
[datePicker setMinimumDate:[NSDate date];
[datePicker setMaximumDate:[[NSDate date] dateByAddingTimeInterval:60*60*24*6]];

He wants only seven days including current date.