title: Handle Date change on primefaces's calendar
body: <p>I'm working on a JSF 2.0 project using Mojarra, PrimeFaces 2.2.1 and Tomcat 6.x.</p>
  
  <p>My application is internationalized. I use the calendar of primefaces like this:</p>
  
  <pre><code>&lt;p:calendar value="#{boxItem.agendaDate}" mode="inline" 
        showOtherMonths="true" styleClass="agendaHBox"
        selectListener="#{boxItem.handleAgendaDateChange}" 
        onSelectUpdate="@form"/&gt;
  </code></pre>
  
  <p>The problem occurs when my locale is different than English and I use selectListener attribute.</p>
  
  <p>For example, it happens when locale is set to Spanish.
  When the calendar appears, it is set to the current date: March 2011 24th.
  When I click other day like 25th march 2011, the selectListener method is being called, but the date I receive is "Thu May 03 00:00:00 CEST 2012"
  and the agenda suddenly changes to March 2012 5th.</p>
  
  <p>The selectListener method is :</p>
  
  <pre><code>public void handleAgendaDateChange(DateSelectEvent event)
  {
     System.err.println("handleAgendaDateChange = " + event.getDate());
  }
  </code></pre>
  
  <p>If I remove selectListener attribute, the calendar behaves correctly (stays as March 2011 and selects 17th), but in this case I have issues handling date changes.</p>
  
  <p>I need some code that will run when user selects a new date in the calendar control and pass it out to backend with Ajax request. How I can do that without the selectListener ?</p>