title: Primefaces inplace calendar save on blur issues
body: <p>Thank you for taking the time to read my question. I have searched the PrimeFaces forums for "calendar" and did not see a similar question. I have also scoured stack-overflow as well as the API docs and have not seen anyone attempting this (or at the very least, nobody has an issue with it.)</p>
  
  <p><strong>High Level</strong></p>
  
  <p>As an FYI: I am running Jsf 2.1.2 and PrimeFaces 5.0 with OmniFaces 1.6 on Jboss 7.11 GA.</p>
  
  <p>I am trying to use an inplace component to get the functionality of an in-line date edit using a calendar component as a date picker and I am having conflicts with blur events.</p>
  
  <p>I need to be able to select a date by either using the mouse or typing a date and hitting enter, leaving the newly selected date as the inplace label. For this, I hook into the calendar's ajax dateSelect event to call inplace.save() (which will also hide everything) and then hook into inplace's save event and use a listener to do my data-saving, <strong>no problems their.</strong></p>
  
  <p><strong>Issue</strong></p>
  
  <p>While choosing a date, I need to be able to click somewhere else on the page and also save the calendar and inplace values. For this, I've been trying to use the calendar's ajax blur event and calling inplace.save().</p>
  
  <p>The problem is that <strong>the blur event is called twice when clicking on one of the month-paging arrows</strong>. It hides the calendar and inplace edit as expected, but I am unable to pick any month beyond the one displayed by default. It could just be how the month paging works, but I'm not sure.</p>
  
  <pre><code>... dataTable var="currentObject"...
  &lt;p:inplace widgetVar="inplace"&gt;
      &lt;p:calendar&gt;
          &lt;p:ajax event="dateSelect" oncomplete="PF('inplace').save()"/&gt;
          &lt;p:ajax event="blur" oncomplete="PF('inplace').save()"/&gt;
      &lt;/p:calendar&gt;
  
      &lt;p:ajax event="save" listener="#{myBean.save(currentObject)}" /&gt;
  &lt;/p:inplace&gt;
  </code></pre>
  
  <p>Has anyone here ever done this before? Is there any [clean] way for me to get me to the 'click away from the date picker to save it' functionality without negatively affecting the usability of the calendar itself? </p>
  
  <p>Any input is greatly appreciated, Thanks!</p>
  
  <p><strong>EDIT:</strong>
  It has been fairly rough using inplace for a data intensive purpose.  The idea was nice on paper but difficult to implement properly and cover all the edge cases.  A few things I did not like about using inplace were:</p>
  
  <ul>
  <li>Inability to tab through data entry fields</li>
  <li>Caused problems with validation and resetInput</li>
  <li>Doesn't degrade gracefully when javascript isn't available</li>
  <li>Mysterious to the user when a save occurs</li>
  </ul>
  
  <p>We decided to not pursue this functionality in the end.  However, the closest solution was the one given in the answer (to use change instead of blur), which still had its own set of 'funky' behaviors.</p>
  
  <p>-Boboman</p>