title: Combine two functions for JQuery DatePicker BeforeShowDay
body: <p>How do I create a function that combines this first function that <strong>disables specific days of the week</strong>;</p>
  
  <pre><code>function disableweekdays(date) {
      var day = date.getDay();
      return [(day != 0 &amp;&amp; day != 2 &amp;&amp; day != 4 &amp;&amp; day != 5), ""];  
  } 
  </code></pre>
  
  <p>with this second function that <strong>disables special days of the year</strong>;</p>
  
  <pre><code>function disablespecialdays(date){
      var array = ["12-25", "01-01"]
      var string = jQuery.datepicker.formatDate('mm-dd', date);
      return [ array.indexOf(string) == -1 ]
  }
  </code></pre>
  
  <p>so that their results can be combined for the <strong>beforeShowDay</strong> in; </p>
  
  <pre><code>$("#myid").datepicker({
      beforeShowDay: disableweekdays,
      minDate: 0, 
      dateFormat: 'dd-MM-yy',
      inline: true,
      showOtherMonths: true,
      dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
  })
  </code></pre>