Friday, 23 June 2017

html5 input date with validation (simple pattern)







<input type="date" name="mydate" oninvalid="this.setCustomValidity('My personal validation message')" placeholder="gg-mm-aaaa" pattern="\d{1,2}-\d{1,2}-\d{4}"  value="" id="mydate" required="required" />