W.K W.K - 1 month ago 21
jQuery Question

Datepicker enable all date

I have an datepicker that work as start date and end date for my project. But I've noticed that the future date are disabled, How can I enable all dates?

$("#CmpnyLastTxn,#CmpnyLastVst,#CPinvite,#CPTxn").datepicker({
maxDate: new Date(),
numberOfMonths: 2,
dateFormat: "dd/mm/yy",
onSelect: function (selectedDate) {
if (!$(this).data().datepicker.first) {
$(this).data().datepicker.inline = true
$(this).data().datepicker.first = selectedDate;
} else {
$(this).val($(this).data().datepicker.first + " - " + selectedDate);
$(this).data().datepicker.inline = false;
}
},
onClose: function () {
delete $(this).data().datepicker.first;
$(this).data().datepicker.inline = false;
}
})

Answer

Don't set Your maxDate param, or set it to null.

http://api.jqueryui.com/datepicker/#option-maxDate