title: primefaces calendar multi events
body: <p>I use primefaces v5.3 and I have a problem about primefaces calendar events. There are 2 ajax events in a calendar. </p>
  
  <p>The definition of calendar is:</p>
  
  <pre><code>&lt;p:calendar value="#{bean.entity.nextDate}"
              id="calDonusTarihi" converter="calendarConverter" locale="tr"
              pattern="dd/MM/yyyy HH:mm" styleClass="zorunluInputCalendar"
              size="13" onSelectUpdate=":f183"&gt;
      &lt;p:ajax event="dateSelect" oncomplete="testEvent('dateSelect');" /&gt;
      &lt;p:ajax event="blur" oncomplete="testEvent('blur');" /&gt;
  &lt;/p:calendar&gt;
  </code></pre>
  
  <p>The JavaScript function that named <code>testEvent</code> is: </p>
  
  <pre><code>testEvent = function(eventName) {
      console.log("Event is: "+eventName);
  }
  </code></pre>
  
  <p>(There were other commands inside of this function. I've removed them to make it easier to read.)</p>
  
  <p>The value of the calendar is null at first. Here's the problem: I open the calendar and the first time I select a date, the blur event is triggered. After the first selection, the dateSelect event is triggered for the other selection states.</p>
  
  <p>When I click a date for the first time, the blur event is triggered and it prevents the date selection I want to do.</p>
  
  <pre><code>**Console**
  Event is: blur
  </code></pre>
  
  <p>As shown below, for every click action (except for the first click) the dateSelect event runs and date is selected successfully. There is no problem at this point.</p>
  
  <pre><code>**Console**
  Event is: dateSelect
  Event is: dateSelect
  Event is: dateSelect
  </code></pre>
  
  <p>Why are two events triggered when I first click a date? I just want the dateSelect event to be triggered without the blur event. How can I do this?</p>