title: How to bind a Date with calendar control in primefaces using binding attribute?
body: <p>I want to bind a date with a calendar control after a specific value is selected from an autocomplete. But the following exception occurs :
  javax.servlet.ServletException: java.util.Date cannot be cast to javax.faces.component.UIComponent</p>
  
  <pre><code>&lt;p:autoComplete value="#{rechargeCustomerBean.school.schoolName}" completeMethod="#{rechargeCustomerBean.completeSchool}" required="true" /&gt;
  
  &lt;p:calendar mode="popup"
          navigator="true" pattern="dd-MM-yyyy" effect="fadeIn"
          showButtonPanel="true"
          binding="#{rechargeCustomerBean.school.expiryDate}" /&gt;
  </code></pre>