Bootstrap datetime picker disable past time

rash111 picture rash111 · Feb 3, 2016 · Viewed 7.1k times · Source

I am using Bootsrap 3 (eonasdan-datetimepicker) Datetime Picker. I am wondering how can i prevent user to select past time. I find the documentation doesn't say much about how to disable past time.

Answer

Jason Tate picture Jason Tate · Feb 4, 2016

Setting the minDate option is what I would recommend minDate: moment()

$('#datetimepicker1').datetimepicker({
    minDate: moment()
});

see this fiddle