title: p:calender is not working when i use beforeShowDay
body: <p>I am working on JSF with primefaces, i have a calendar field in those when i need to disable some dates , so i have used the attribute named <code>beforeShowDay</code>, but the thing is that when i use this attribute the calendar is not opening(not pop-up) , but when i dont use <code>beforeShowDay</code>attribute it is working ,</p>
  
  <p><strong>My code is:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html &lt;!--namespaces--&gt;&gt;
      &lt;h:body&gt;
        &lt;ui:composition&gt;
          &lt;ui:define name="content"&gt;
          &lt;script type="text/javascript"&gt;
            function tuesdaysAndFridaysDisabled(date)
            {
              var day = date.getDay();
              return [(day != 2 &amp;&amp; day != 5), '']
            }
          &lt;/script&gt;
          &lt;h:form&gt;
          &lt;p:calendar id="leavefrom"  value="#{requestbean.leavefrom}" beforeShowDay="tuesdaysAndFridaysDisabled" effect="drop"  pattern="yyyy/dd/MM" required="true" &gt;
              &lt;p:ajax update="leaveto" event="dateSelect" /&gt;
          &lt;/p:calendar&gt;      
           &lt;/h:form&gt;                      
         &lt;/ui:define&gt;
       &lt;/ui:composition&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any suggestion for this..</p>