How to set up display of specific dates in UIDatePicker?

My application needs to give the user the ability to select a date from a list of dates matching a specific template. For example, they may need to select Monday from the list on Monday for a month. Is there any way to get UIDatePickerto limit the date selection to a specific subset or should I just use UIPickerView?

+5
source share
2 answers

You cannot limit which dates you can select at UIDatePicker. You can change the date when an event with a changed value is dispatched, but since the user cannot determine which dates are “good” and which are not, this is a poor user interface choice for this.

Use UIPickerViewyour own creation instead.

+6
source

UIDatePickerIt has the properties minimumDateand maximumDatefor this purpose. No need to use UIPickerViewit for this reason.

0
source

All Articles