title: Disable specific days in p:calendar?
body: <p>I am working on <code>Primefaces</code> in JSF , i am just trying to disable all sundays in calendar,</p>
  
  <p>How can i do it,,</p>
  
  <ul>
  <li>As i referred sites, i got a point we can achieve it using <code>beforeShowDay</code> but i don't know how to use it.</li>
  <li><p><a href="http://courses.coreservlets.com/Course-Materials/pdf/jsf/primefaces/users-guide/p-calendar.pdf" rel="nofollow">Primefaces user guide</a> page 10 explains it, but i don't understand what they trying to say.</p>
  
  <pre><code>&lt;p:calendar value="#{dateBean.date}" beforeShowDay="tuesdaysAndFridaysOnly" /&gt;
  
  function tuesdaysAndFridaysDisabled(date)
  {
    var day = date.getDay();
    return [(day != 2 &amp;&amp; day != 5), '']
  }
  </code></pre></li>
  </ul>
  
  <p>In above code they are calling the function <code>tuesdaysAndFridaysDisabled</code> from <code>beforeShowDay</code> but my question is </p>
  
  <ul>
  <li>They are calling the function name as <code>tuesdaysAndFridaysOnly</code> but how it will affect the function <code>tuesdaysAndFridaysDisabled</code></li>
  </ul>
  
  <p>And it not working too.. How to achieve it and what is happening there..</p>