title: jquery datepicker getMonth() weirdness
body: <p>jquery datepicker is a great fun but I am facing a weird error. I am trying to disable some days, ie. 28 October 2009 but 28 November gets disabled on the calendar! Any idea what I am doing wrong here? The disabledDays array variable is a script registered on the server as the closing dates come from database.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      $(document).ready(function() {
          $("#datepicker").datepicker(
              {
                  dateFormat: 'dd/mm/yy',
                  changeYear: false,
                  yearRange: '0:+1',
                  numberOfMonths: 2,
                  firstDay: 1,
                  minDate: '0',
                  maxDate: '+2m',
                  altFormat: 'dd/mm/yy',
                  beforeShowDay: DisableClosedDays
              });
      });
  
  
      function DisableClosedDays(calendarDate) {
          for (i = 0; i &lt; disabledDays.length; i++) {
              if (calendarDate.getDate() == disabledDays[i][0]
              &amp;&amp; calendarDate.getMonth() == disabledDays[i][1]
              &amp;&amp; calendarDate.getFullYear() == disabledDays[i][2]) {
                  return [false, ''];
              }
          }
          return [true, ''];
      }
  &lt;/script&gt;
  
  
  
  
  
  &lt;script type="text/javascript"&gt; 
  //&lt;![CDATA[
  var disabledDays = [[22,10,2009],[30,10,2009],[12,10,2009]];
  //]]&gt;
  &lt;/script&gt;
  </code></pre>