Set minDate to Today in Bootstrap DateTimePicker

Set minDate to Today in Bootstrap DateTimePicker

I’m using Bootstrap DateTime Picker ( and I’ve found the basic option to set a minDate; but, I can’t get it to set to today to save my life. I’ve tried things like Date(); but, nothing working. Anyone have any ideas?
pickTime: false,
icons: {
time: “fa fa-clock-o”,
date: “fa fa-calendar”,
up: “fa fa-arrow-up”,
down: “fa fa-arrow-down”
startDate: new Date()


Solution 1:

If you’re using the latest version, the minDate option is what you’ll need to set. Here is a JSFiddle with a working example. Hope this helps.

    pickTime: false,
    icons: {
      time: "fa fa-clock-o",
      date: "fa fa-calendar",
      up: "fa fa-arrow-up",
      down: "fa fa-arrow-down"
    minDate: moment()

Solution 2:

	startDate: "dateToday"

Solution 3:

You can use this code, by avoiding additional scripts.


var todayDate = new Date().getDate();
var endD= new Date(new Date().setDate(todayDate - 15));
var currDate = new Date();
    format: 'dd/mm/yyyy',                       
    autoclose: true,
    startDate : endD,
    endDate : currDate

Related:  Twitter bootstrap - how to remove gradient mixin in subclass