I have a date in UILabel(like 'Dec 14, 2010). This date i want to set as minimum date of my UIDatepicker. How can i do this please reply?
Thanks Nishant
Convert your UILabel text in to date format using NSDateFormatter and put that value replacing "Date" in following example:
UIDatepicker *datePicker;
NSDate *Date=[NSDate date];
datePicker.minimumDate=Date;
You can use NSDateFormatter and use setDateFormat method for setting Date format.
[formatter setDateFormat:@"MMM dd,yyyy"];
NSDate *date = [formatter dateFromString:lblDate.text];
datePicker.minimumDate=date;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With