How to make iPad HTML5 default to blank / empty using the following button

The iPad is used by default today when it input type="date"receives focus (due to the next / previous buttons, and I assume the tab / shift-tab using the bluetooth keyboard), for example. using http://jsbin.com/etovur/1 on the iPad.

Question: Is there a workaround that works on both the iPad and iPhone to make the date non-default today when you simply navigate the field?

This is a user interface problem when editing existing data and using the next / previous to navigate fields, as it changes the space for today, for example. the employee end date field is set to date, and the employee has been fired.

We only need a solution that works on the iPad / iPhone, and beware that the implementation input type=datebetween the two devices has significant differences. Desktop browsers do not matter, because we use non-native date control (precisely in order to avoid problems with changing how the date controls work and look or whether they are provided). The problem occurs, at least with the iPad with iOS5 and the iPhone with iOS6.

+5
source share
1 answer

Basically a working solution: see http://jsbin.com/etovur/5 - when the date entry gets focus, set the value to '' after the delay.

  setTimeout(function() {
    document.getElementById('adate').value = '';
  }, 0);

, ( , ). IMHO datepicker iOS, , - .

( iPad?).

0

All Articles