Enable the datepicker from a particular date
<p>I am making an iphone app on one of the view I am using a date picker. I have an another date which I am fetching from the database. Now I want that the date picker enable from the selected date so that user couldn't get unable to select the same date again. Is there any way to enable the picker from selected date. If anyone know please help me.</p>

<pre><code>-(void)findextenddate
{
    NSLog(@"count:%@",adddatetime);
    addatimeclass = adddatetime;
    endnsdate = [addatimeclass objectAtIndex:[addatimeclass count]-1];
    endnsdate1 = (NSDate*) endnsdate; 
    NSLog(@"formatdate:%@",endnsdate1);
}

-(IBAction)clicktoextend:(id)sender
{
    actionsheet = [[UIActionSheet alloc]init];
    actionsheet = [[UIActionSheet alloc] initWithTitle:@"Select Date" delegate:self
                                      cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Select", nil];
    [actionsheet showInView:[self.view superview]];
    [actionsheet setFrame:CGRectMake(0, 117, 320, 383)];
    pickerView = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 40, 320, 216)];
    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"];

    pickerView.minimumDate = endnsdate1 ;
    pickerView.datePickerMode = UIDatePickerModeDate;
    //Add picker to action sheet
    [actionsheet addSubview:pickerView];
    subviews = [actionsheet subviews];


    [[subviews objectAtIndex:SelectButtonIndex] setFrame:CGRectMake(20, 266, 280, 46)]; 
    [[subviews objectAtIndex:CancelButtonIndex] setFrame:CGRectMake(20, 317, 280, 46)];
    [pickerView release];
    [actionsheet release];
}
</code></pre>

<p>Thanks alot.</p>
