UIDatePicker constraints not working in device
问题 I am using UIDatePicker control in my project. Added the UIDatePicker in xib file, and programmatically setting the constraints such as minimumDate, maximumDate to the datePicker. This is working fine in simulator, but in device I am able to select any date in datePicker. Sample code: - (void)viewDidLoad { [super viewDidLoad]; [self.datePicker setMinimumDate:[NSDate date]]; [self.datePicker setMaximumDate:[[NSDate date] dateByAddingTimeInterval:3*24*60*60]]; } screenshot: Note: I am working