title: Primefaces calendar does not set the date
body: <p>I have yet another misunderstanding of Primefaces work logic.</p>
  
  <p>For now <code>&lt;p:calendar&gt;</code> component cannot set selected date when I press submit button.<br>
  I see that it successfully enters into actionListener method, but date value is null there.  </p>
  
  <p>First of all I tried create my calendar using standard PF <a href="https://www.primefaces.org/showcase/ui/input/calendar.xhtml" rel="nofollow noreferrer">example</a>. It looked too simple and I thought according this that the component should call value setter when the user select the date or submit the form. But it did it neither in the first nor in the second case.
  Well, I opened Google and found a few posts:</p>
  
  <p><a href="https://stackoverflow.com/questions/17737414/primefaces-calendar-setting-date-value-in-backing-bean">Primefaces Calendar Setting Date Value in Backing Bean</a><br>
  <a href="https://stackoverflow.com/questions/35892935/pcalendar-value-not-set-in-backing-bean">p:calendar value not set in backing bean</a></p>
  
  <p>I ensured that my calendar is located between <code>&lt;h:form&gt;&lt;/h:form&gt;</code> tags. Also I tried to add <code>process="@this"</code> and <code>process=":beginDateForm :endDateForm @this"</code>, where beginDateForm and endDateForm are forms contained <code>&lt;p:calendar&gt;</code> components.<br>
  Also I found the <a href="https://stackoverflow.com/questions/16437986/pcalendar-value-not-updated-with-dateselect">post</a> and tried to create SelectEvent listener method:</p>
  
  <pre><code>private void changeDate(SelectEvent event) {
      beginDate = (Date) event.getObject();
  }
  </code></pre>
  
  <p>But unsuccessfully.</p>
  
  <p>I also tried to change Date using valueChangeListener:</p>
  
  <pre><code>&lt;h:form id="beginDateForm"&gt;
      &lt;p:calendar id="passBeginDate" valueChangeListener="#{territoryFormBean.changeDate}" mode="popup" readonly="true" pattern="dd.MM.yyyy" showOn="button" value="#{territoryFormBean.beginDate}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Of course I changed event to ValueChangeEvent.</p>
  
  <p>After that I moved <code>&lt;p:calendar&gt;</code> and <code>&lt;p:commandButton&gt;</code> components into the same <code>&lt;h:form&gt;</code> and tried two different process values <code>process="passTerrForm:passBeginDate passTerrForm:passEndDate @this"</code> and <code>process="@form @this"</code> and <code>process="@form"</code>
  In the last case button does not trigger even the listener method.</p>
  
  <p>My current components are:</p>
  
  <pre><code>&lt;p:commandButton value="Search" id="searchPassButton" actionListener="#{territoryFormBean.search}" update=":passTerrForm:territoryTable" process="passTerrForm:passBeginDate passTerrForm:passEndDate @this" partialSubmit="true" /&gt;
  
  &lt;p:column&gt;
      &lt;p:calendar id="passBeginDate" mode="popup" readonly="true" pattern="dd.MM.yyyy" showOn="button" value="#{territoryFormBean.beginDate}" /&gt;
  &lt;/p:column&gt;
  &lt;p:column&gt;
      &lt;p:calendar id="passEndDate" mode="popup" readonly="true" pattern="dd.MM.yyyy" showOn="button" value="#{territoryFormBean.endDate}" /&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <p>Guys, could you please suggest anything else. Or probably you can see what is wrong in my code.
  I cannot understand why the component does not call setter.</p>