1

I want to hide the past as well as future dates from my UIDatePicker. Only want to show today's date. Is it possible? Right now all the dates are coming, but only today's date is selecting. Time is also there. So in short I want to select today's date time by showing today's date only.

1 Answers1

1

Than no need to add DatePicker.

NSDateFormatter *formatter;
NSString        *dateString;

formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"dd-MM-yyyy"];
dateString = [formatter stringFromDate:[NSDate date]];
iBhavin
  • 1,261
  • 15
  • 30