How to Validate date and time using html5 -
i use html5 feature getting date , time follw
<input type="datetime-local" name="dtl" id='dd'>
it work fine want start current date , time
,previous date , time
should not allowed use.
so please suggest me how it.
you're gonna need javascript this. create date , assign datatime-local input
field:
var date = new date(), dd = document.getelementbyid('dd'); dd.value = date.toisostring();
to require date in future, modify min
attribute of input, that's not going work because day no major browser date supports type of input. might better off using javascript-based date picker job.
Comments
Post a Comment