title: jquery datepicker disable weekends without beforeShowDay
body: <p>I have integrated the jQuery DatePicker in my homepage. The Problem is that I can't disable weekends with the <code>beforeShowDay</code> function because I already use <code>beforeShowDay</code> to mark specific dates. I hope there is any possibility to disable weekends without the <code>beforeShowDay</code> function.</p>
  
  <pre class="lang-js prettyprint-override"><code>$(function() {
    var eventDates = {};
    &lt;?php
      for ($i = 0; $i &lt;= sizeof($view) - 1; $i++)
      {
        $date = explode(":" , $view[$i]);
          echo "eventDates[ new Date( '" . $date[1] . "' )] = new Date( '" . $date[1] . "' );";
      }
    ?&gt;
  
    $("#datepicker").datepicker({
      firstDay: 1,
      dateFormat: "yy-mm-dd",
      maxDate: new Date,
      minDate: "2016-03-08",
      dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
      dayNamesShort: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
      dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
      onSelect: function(dateText, inst) {
        $("#datepicker_value").val(dateText);
        $(this).parent('form').submit();
      },
      beforeShowDay: function(date) {
        var highlight = eventDates[date];
        if (highlight) {
          return [true, "eventyellow", ''];
        } else {
          return [true, '', ''];
        }
      }
    });
  });
  </code></pre>