title: datepicker - beforeShowDay not working
body: <p>I'm trying to use <code>beforeShowDay</code> to block days from the calendar. I found this <a href="http://jsfiddle.net/yTMwu/18/" rel="nofollow">Fiddle code</a>  that works. But I can`t figure out why my code doesn't work for me. I get no error-messages. I can see the dates in console which are not -1, the problem is that the calendar doesn't block the dates that are  unavailable (the dates that return -1). The user can pick whatever date they want.</p>
  
  <p><strong>This is my html :</strong></p>
  
  <pre><code>&lt;div class="input-group input-append date" id="dateRangePicker"&gt;
      &lt;input type="text" id="date" class="form-control" name="date" /&gt;
      &lt;span class="input-group-addon add-on"&gt;&lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>and this is my JQuery :</strong></p>
  
  <pre><code>    availableDates = ['04-25-2015','04-27-2015','04-22-2015'];
      $('#date').datepicker({
      dateFormat: 'mm-dd-yy',
      startDate: "04-20-2015",
      endDate: "01-01-2016",
      beforeShowDay: function(d) {
          var dmy = (d.getMonth()+1)
          if(d.getMonth()&lt;9) 
              dmy="0"+dmy; 
          dmy+= "-"; 
  
          if(d.getDate()&lt;10) dmy+="0"; 
              dmy+=d.getDate() + "-" + d.getFullYear(); 
  
          console.log(dmy+' : '+($.inArray(dmy, availableDates)));
  
          if ($.inArray(dmy, availableDates) != -1) {
              return [true, "","Available"]; 
          } else{
               return [false,"","unAvailable"]; 
          }
      },
      todayBtn: "linked",
      autoclose: true,
      todayHighlight: true
      });
  </code></pre>