title: Changing color of disabled days in a JQuery datepicker
body: <p>I'm using JQuery to display a calendar (datepicker).</p>
  
  <p>I've disabled weekends easily and then I've tried to disable national days.</p>
  
  <p>So here a sample of code:</p>
  
  <pre><code>function checkHolidays(date, holidaysArray) {
      for (var i = 0; i &lt; holidaysArray.length; ++i) {
          if (date.getMonth() == holidaysArray[i][0].getMonth()
              &amp;&amp; date.getDate() == holidaysArray[i][0].getDate()) {
              return ([false, 'holiday', holidaysArray[i][1]]);
          }
      }
      return [true, ''];
  }
  </code></pre>
  
  <p>This is working. But I want to change the color of the cell (the 'holiday' css property) and this is not working. Because I'm setting the day as disabled, the holiday css property is not applied.</p>
  
  <p>But if I do not disable the date, i.e:</p>
  
  <pre><code>return ([true, 'holiday', holidaysArray[i][2]]);
  </code></pre>
  
  <p>The css property is working. Got any idea?</p>
  
  <p>Edit:</p>
  
  <p>I've updated my css rule to:</p>
  
  <pre><code>.holiday, .ui-datepicker .holiday span
  {
       background: none #FFEBAF;
       border: 1px solid #BF5A0C;
  }
  </code></pre>
  
  <p>And now it's working perfectly.</p>
  
  <p>This post helped me: <a href="http://forum.jquery.com/topic/datepicker-change-color-of-date-cell" rel="nofollow">How to change cell color</a></p>