I'm using the "datepicker" plugin on my project, it's set to decade view, and I want to disable the future dates, for this I have used the maxDate
option but it's not working, my code:
$('#data_1 .input-group.date').datepicker({
todayBtn: "linked",
maxDate: "0",
keyboardNavigation: false,
forceParse: false,
calendarWeeks: true,
autoclose: true
});
tried with 0
and new Date
If u are trying calendar for start date and end date then this will help you :)
Try below code:
Also you can try with:
Note that bootstrap-datepicker has no
maxDate
option, you have to useendDate
.Here a working sample:
Adding attribute
data-date-end-date="0d"
worked for me: