I have a UIDatePicker
that I have programmatically added into my code, I'm now looking to see if I can somehow set a range on the time. So that the user can only select a date, and a time between the hours of 09:00 and 17:30. Any other options would ideally not show up. Is there a way I can add this into my UIDatePicker code?
Here is my code:
CGRect pickerFrame = CGRectMake(0,250,0,0);
UIDatePicker *myPicker = [[UIDatePicker alloc] initWithFrame:pickerFrame];
[myPicker addTarget:self action:@selector(pickerChanged:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:myPicker];