Reputation: 89
How can I restrict the specific year in a date picker in iPhone programatically?
For example, if user's date of birth is 1990 then I need to restrict the user to select the previous years from 1990 (1989, 1988, etc.). How can I restrict those years in the date picker?
Upvotes: 0
Views: 834
Reputation: 8256
You can use: [picker setMinimumDate: [NSDate date]];
In place of [NSDate date] set your requirement according to you.
Upvotes: 4