title: Primefaces calendar, apply custom style for weekends and holidays
body: <p>I want to apply css for weekends and holidays for p:calendar. I am trying to invoke the 
  <code>beforeShowDay</code> event using jQuery and based on condition set the css.</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function(){
         $(".hasDatepicker").datepicker("option", "beforeShowDay", function (date) {
            //If condition true
            return [true,'holidays'];
            //else
            return [true,''];
         });
      });     
  &lt;/script&gt;
  
  &lt;style&gt;
      .holidays {background-color: wheat;}
  &lt;/style&gt;
  
  &lt;h:form prependId="false"&gt;
        &lt;p:calendar/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>But the event is not getting fired. Is there anything else I am missing, or any other approach?</p>