jamesxu-e.g.
jamesxu-e.g.

Reputation: 650

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?

Upvotes: 1

Views: 473

Answers (1)

elahiammar
elahiammar

Reputation: 129

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;

Upvotes: 1

Related Questions