I am creating my own UIPickerview for dates as I need only Months and Days and do not want years, so I cannot use UIDatePicker. When different months are selected I cannot seem to replicate the way UIDatepicker gray's out the unavailable days. For example: when November is selected days 1-30 are selectable but 31 is not when using the UIDatepicker. Does anyone know how to replicate this and make certain row grayed out and unselectable.In uidatepicker unseletable option is there.So please help me.
Use uipickerview with two components.. se that example it may help you Link
or this link
When a month is selected in component 1 try to reload the picker view. Then in this method:
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;
try to set the
yourRow.isUserInteractionEnabled = NO;
I hope this helps you. Cheers!! Happy Coding!