I would like to display today's date in my datapicker and in the same time disable future dates. For the moment I can only do one option, I can just disable future dates or I can display today's date.
here is my code:
$('#datepicker').datepicker({
format: "dd-mm-yyyy",
endDate: today,
});
$('#datepicker').datepicker('setDate', new Date());
$( "#datepicker" ).datepicker({
dateFormat:"dd-mm-yy",
maxDate : new Date()
});
MaxDate helps you to limit the future dates