2

UIDatePicker Shows Empty Picker View. It's working perfect, I mean It is scrolling, It is setting date to respective textfield but in picker view it is not displaying date. I have attached a screenshot.

Code for DatePiker,

 datePicker = [[UIDatePicker alloc]init];
 datePicker.datePickerMode = UIDatePickerModeDateAndTime;
 [datePicker setDate:[NSDate date]];

 _txtDue.inputView = datePicker;

enter image description here

Any help will be appreciated!

steveb
  • 5,382
  • 2
  • 27
  • 36
Ketan Parmar
  • 27,092
  • 9
  • 50
  • 75

1 Answers1

0

Finally I figure out it. It was a issue of one third party library called UIHidingView!! It was added by someone in this project. This library's description from github states that,

UIHidingView is an iOS class that displays UIView element on top UITableView which is hiding when Table View is scrolling

Now UIDatePicker internally used tableview in it so, it was hiding it's components!

PS : take care when using third party libraries!!

Ketan Parmar
  • 27,092
  • 9
  • 50
  • 75