Is there any other way by which I cannot allow the user to select next months. I had gone through some threads but I don't want to disable both next and previous buttons by using step functionality as directed in this link.
function bindPicker() {
$("input[type=text][id*=Date]").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:+0",
showOn: "both",
buttonImage: "../../images/Calender.png",
buttonImageOnly: true,
dateFormat: "M-yy"
});
}
Try setting the maxDate option to 0, this set the max date to +0 days from today.
More info: http://api.jqueryui.com/datepicker/#option-maxDate
Datepicker with hiding next and prev buttons and date format and defined date.
If you only want to hide the next/previous when they're disabled (ie. all valid dates are within a single month), use the following:
Well if you are looking to simply remove the next/previous options and only use a forced month in your code, you can use CSS.
This will just remove the next/prev buttons all together. Then if need be you can even put in like some .toggle() code to show/hide them when needed.