I have a five-month Datepicker inline calendar. startDate is a variable I wrote which is set by a user click event. I am adjusting the minDate and maxDate options after init by doing this:
$('#datepicker').datepicker("option",{"minDate":startDate,"maxDate":endDate}).datepicker("refresh");
However, when the calendar is refreshed, it displays the first month according to the startDate variable, which is disorienting. For example, I have the calendar init in January and it shows through May. When startDate happens to be in a later month, say February, then when I refresh the calendar, it displays starting from that month (February) and disables all dates up to the one selected. I'd like to freeze the calendar so that it always shows January through May, yet blacks out all the dates up to minDate.
Is there an easy way to freeze the calendar so that it displays a specific 5-month range regardless of the minDate and maxDate settings?
Thanks in advance.