Hi everybody, I use jquery date time picker. I want to restrict it for past time. I found "minTime : 0 " as an option but when I apply it, affect all days. ( for example time is 3:00 PM now, I want restrict user to select 2:00 PM but only for today, "minTime : 0 " restrict all days and user can't select 2:00 PM tomorrow) and this is very bad. also I try following code : let date = new Date(); let time = date.getHours()+":"+date.getMinutes(); minTime: time, but I got the same result. can anybody help me? Thanks in advance.
Hi @Maede You can restrict time by following way: Code: $(function () { $('#datetimepicker').datetimepicker({ minDate : moment(), }); }); Hope this will help you. Thank you.
Hi Thanks for your help. It only restrict days not hours, I added it as minTime : moment() for restrict hours, but acts as "minTime : 0," and restrict hours of today and all of next days. I want to restrict today hours only.