I would like to disable future dates (starting with the day after tomorrow) using datapicker, but it's not working. I tried 3 solutions:
maxDate: 0
and
maxDate: '0'
and
maxDate: new Date();
All of them not working. Does anyone have any idea why not? Here is my code:
$('#datepicker').datepicker({
format: "dd-mm-yyyy",
maxDate: 0
});
I'm assuming you're using bootstrap-datepicker. If that's the case, you should be using
endDate, notmaxDate.If you're using another script, would be helpful adding this info to your question.