jeudi 14 juillet 2016

Disable datepicker past date & time


I'm using datepicker and i like people not be able to select date and time previous to the present day. I used "minDate: 0" to disable the past date but is there a way to disable past time. For example, if the current time is 5am, i do not want people to select 3 or 4 am of the same day. This is my code: var dt; dt = $('#datetimepicker3').datetimepicker({ inline:true, minDate: 0, format:'m/d/Y H:i', formatDate:'d/m/Y' });

Aucun commentaire:

Enregistrer un commentaire