Reputation: 75
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;
}
})
Upvotes: 0
Views: 3044
Reputation: 156
Don't set Your maxDate param, or set it to null.
http://api.jqueryui.com/datepicker/#option-maxDate
Upvotes: 3