Jquery UI Calendar Problem

If you look at this page http://jsfiddle.net/CasperGemini/72sbo205/10/ what I’m trying to achieve is that it does do the 11 month ahead, but at the end of the 11 month, I’d like the rest of the days for that month to be selectable just for that month.

I’ve been doing this for 2 days now and I’m nowhere near a solution, is there any suggestions or solutions to this problem??

Hi,

You can do it like this:

function endOfMonth(n){
  var now = new Date,
      lastDayOfMonthN = new Date(1900+now.getYear(), now.getMonth()+(n+1), 0);
  return lastDayOfMonthN;
}

$( "#datepicker" ).datepicker({ 
    minDate: 0, 
    maxDate: endOfMonth(11)
});

HTH

oh wow, after the xmas holidays I still have yet to solve this issue, hahaha I’ll give it a shot when I return to the office from my vacation, but Thanks in Advance!!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.