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.
Asked
Active
Viewed 1,059 times
1
-
2Why show a date picker then? – Filip Radelic Aug 06 '14 at 09:52
-
1then there is no need for datepicker – Mohit Aug 06 '14 at 09:53
-
for that no need datepicker....use custom pickerview – Aug 06 '14 at 09:55
-
Use only timepicker don't add date feature in picker itself. – Mrunal Aug 06 '14 at 09:56
1 Answers
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