$("SELECTOR").datepicker({
autoclose: true,
todayHighlight: true,
format: {
toDisplay: function (date, format, language) {
return moment(date).utc().format(format1);
},
toValue: function (date, format, language) {
var date1 = moment(date).format('YYYY-MM-DD');
var d = new Date(date1);
d.setDate(d.getDate() + 0);
return new Date(d);
}
},
language:"en",
endDate: '+0d'});
Here due to format code the end date is not working, and I can not remove that too, I want to disable all the future dates with this code, please suggest any solution.
