'Why does my datepicker not show after clearing in iOS web view

<input id="travel_time" type="text"  onfocus="this.type='date'" value="<!--{$min}-->" />

First click, the datepicker will open, but select "clear". Click again, and the datepicker will not show again.

Does anybody can know how to get the datepicker to show after clearing?



Solution 1:[1]

Try this code:

NSDateFormatter *dateformatter = [[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"dd-MM-yyyy HH:mm"];
NSString *dateString = [dateformatter stringFromDate:self.datePicker.date];
self.job.date = dateString;
self.textFieldDate.text = dateString;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TylerH