title: PrimeFaces calendar accepts invalid dates as input
body: <p>The problem I am having is with the PrimesFaces 3.4.1 calendar. When using the popup date picker activated either through the button or on input field focus you can only select valid dates which work fine, happy days! </p>
  
  <p>The issues comes when you manually add a date into the input field, if you add an invalid date the PrimeFaces calendar component takes its best guess at converting this into a valid date and then sending it, meaning that back-end validation is a no go. Some interesting translations below:</p>
  
  <ul>
  <li>30/02/2012 becomes 2/6/2014</li>
  <li>322/05/2012 becomes 5/10/2038</li>
  <li>01/14/2012 becomes 4/1/2012</li>
  </ul>
  
  <p>To recreate this madness have a look at the <a href="http://www.primefaces.org/showcase/ui/calendarBasic.jsf;jsessionid=fy9n1sca0o1kgea904acjn9p" rel="nofollow">PrimeFaces Calendar Showcase</a>.</p>
  
  <p>I have seen solution around using the <code>readOnlyInput='true'</code> attribute but that only seems to prevent letters being entered in the field not number or slashes. Below is one instance of the calendar I have implemented:</p>
  
  <pre><code>&lt;p:calendar id="fldDateOfBirth"
              value="#{pc_CreateUser.user.dateOfBirth}"
              binding="#{pc_CreateUser.dobComp}"
              navigator="true"
              pattern="dd/MM/yyyy"
              maxlength="10"
              yearRange="-100"
              validator="#{pc_CreateUser.validateDOB}"
              title="#{msg.user_date_format_default_tip}"
              converterMessage="#{msg.user_error_dob_invalid}"
              readOnlyInput="true"
              showOn="button" /&gt;
  </code></pre>
  
  <p>Solution wise I am open to any suggestions:</p>
  
  <ol>
  <li>Is this a common issues in PrimeFaces? Is there a trick I can use to
  fix it?</li>
  <li>Could I use JavaScript to validate the date before it's sent or to
  block all user input entirely? </li>
  <li>Anything else I haven't thought of!</li>
  </ol>
  
  <p>Thanks in advance, this has been causing me issues for weeks!</p>