javascriptjquerybootstrap-datetimepicker

What is difference between minDate and startDate - datetimepicker


Which one is correct. And what exactly difference between?

$(function() {
  var today = new Date();
  today.setDate(today.getDate());
  $('#date').datetimepicker({
    pickTime: false,
    minDate: today
  });
}

and

$(function() {
  var today = new Date();
  today.setDate(today.getDate());
  $('#date').datetimepicker({
    pickTime: false,
    startDate: today
  });
}

Solution

  • You are not allowed to select date before minDate. Startdate is just an initial value.