Bootstrap datetimepicker disable past dates & current date?
I want to disable past dates & current date, but I'm unable to disable current date. Below my code, only disables past dates , please correct my code if I'm wrong, thanks in advance. <script> $('#datetimepicker1').datetimepicker({ minDate: moment(1, 'h') }); </script> Try disabledDates with minDate: $('#datetimepicker').datetimepicker({ minDate:new Date(), disabledDates: [new Date()] }); Fiddle use the minDate and disabledDates: $('#datetimepicker').datetimepicker({ minDate:new Date(), disabledDates: [new Date()] }); 来源: https://stackoverflow.com/questions/43610281/bootstrap-datetimepicker