$(function () {
var minimumdate = document.getElementById("PageContent_hdnVdate").value;
//var currentDate = new Date();
var currentDate = new Date();
$("#<%=txt_installationDate.ClientID %>").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "dd/M/yy",
// maxDate: "+12m",
maxDate: currentDate,
minDate: minimumdate,
showOn: "button",
showOn: "both",
buttonImage: "../img/calendar.png",
buttonImageOnly: true,
onClose: function (selectedDate) {
$("#<%=txt_installationDate.ClientID %>").datepicker("option", "minDate", selectedDate);
}
});
});
Loading
Muhammad Imran AnsariPosted Jan 25, 2025, 6:45 PM
HI Selva,
You can try the below updated code:
Amira BedhiafiPosted Jan 25, 2025, 6:45 PM
Try to set
minDateto the desired future date in your case 1st April 2025 and setmaxDateto allow selection of dates beyond April 2025 if you need it :