SNV7
SNV7

Reputation: 2593

Limiting the visible dates in UIDatePicker

Is there a way to limit the date range in UIDatePicker? I'm aware of the maximumdate and minimumdate properties but I'd like to limit the minimum year visible to 2010. I don't want the user to be able to see any years before 2010. Any ideas?

Upvotes: 0

Views: 115

Answers (1)

ganzogo
ganzogo

Reputation: 2614

I don't believe this is possible with a UIDatePicker, but you could achieve this with your own UIPickerView, making sure to implement the UIPickerViewDelegate method, pickerView:didSelectRow:inComponent: in order to deal with bad dates, like February 30th, (to mimick the behaviour of UIDatePicker).

Upvotes: 1

Related Questions