Unsupport time input on Android

By

<input type="time" id="time" name="booking_time" required autocomplete="off" pattern="[0-9]{2}:[0-9]{2}" oninvalid="this.setCustomValidity('Please input time')" oninput="setCustomValidity('')" 

Symptom: time selector from Android always be validated as an error.

Solution: add pattern=”[0-9]{2}:[0-9]{2}” attribute on to time input.

Explanation from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time

Leave a Comment