I have a UIDatePicker
with set minimum and maximum dates. I'm wondering if there is a way to hide the rows of the columns for the dates/times that are either before my minimum date or after my maximum date. Right now the picker displays every single day but only the current week is available to select (bold), what I would like is to have the numbers outside the range of the given week to be hidden from view. can this be done with the UIDatePicker
provided by XCode
or would I have to build my own picker from scratch?
- (void)viewDidLoad
{
[super viewDidLoad];
self.formatter = [NSDateFormatter new];
[self.formatter setDateFormat:@"dd:hh:mm:ss"];
NSDate *now = [NSDate date];
picker.minimumDate = [NSDate date];
picker.maximumDate = [now dateByAddingTimeInterval:604800];
[picker setDate:now animated:YES];
self.counterLabel.text = [now description];
self.now = [NSDate date];
self.counterLabel.text = [self.formatter stringFromDate:self.now];
}