I\'m using Bootstrap DateTime Picker (http://eonasdan.github.io/bootstrap-datetimepicker/) and I\'ve found the basic option to set a minDate; but, I can\'t get it to set to toda
$(".datepicker-custom-flight").datepicker({
startDate: "dateToday"
})
You can use this code, by avoiding additional scripts.
Example
var todayDate = new Date().getDate();
var endD= new Date(new Date().setDate(todayDate - 15));
var currDate = new Date();
$('.datepicker').datepicker({
format: 'dd/mm/yyyy',
autoclose: true,
startDate : endD,
endDate : currDate
});
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.
$('#date').datetimepicker({
pickTime: false,
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-arrow-up",
down: "fa fa-arrow-down"
},
minDate: moment()
});