Hello friends I am trying to set the Time Range Of the DatePicker in UIDatePickerModeTime,as we have MaxDate and MinDate,whether its possible to set Mintime and Maxtime selected by user,,
Suppose I want the user to select the time between 16:00 to 19:00 only for each day then how can I do it,,
Thanks&Regards Ranjit
Hello friends I tried the below code to set the start time range and its working fine...
NSDate *todaysDate =[NSDate date];
NSDateComponents *comps = [gregorian components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit |NSSecondCalendarUnit fromDate:todaysDate];
[comps setHour:16];
[comps setMinute:00];
[comps setSecond:00];
NSDate *startDate = [gregorian dateFromComponents:comps];
NSDateComponents *startcomps = [[NSDateComponents alloc] init];
[startcomps setDay:startDay-weekday];
self.minDate = [gregorian dateByAddingComponents:startcomps toDate:startDate options:0];
but when I apply the same code to set the end time range its not working....can any body please help me out in this matter
Regards Ranjit