I am using HTML5 inputs to select a date.
I simply want to open that input if the users clicks on a specific image but I can’t force the mobile browsers to open their datepickers.
Here is the element:
<input type="date" class="dateInput" name="day" id="day">
Simple question:
How to open in with javascript?
The HTML5 datepickers open when the users focuses a form element. If you click/touch an image this is not the same as getting the focus.
But you could probably emulate this behavior by firing the focus-event on the image-click: