iOS Datepicker: How to LOCK invalid dates?
问题 I've been struggling with the maximum/minimum date lately, and honestly, I don't know what I'm missing here. I searched a lot and no one seems to complain about it. (I'm not talking about setting a maximum/minimum date as these can only make invalid dates appear gray) Here's what I've done so far: [myDatePicker addTarget:self action:@selector(disableDate) forControlEvents:UIControlEventValueChanged]; Then, on disableDate, I have something like this: if ([myDatePicker.date compare:[NSDate date