title: jquery datepicker onChangeMonthYear
body: <p>I am using the jquery ui datepicker in my app.
  I have created an inline datepicker.
  I am having a problem with <a href="http://docs.jquery.com/UI/Datepicker#event-onChangeMonthYear" rel="noreferrer">onChangeMonthYear</a>. I have simplified the example to bare minimum.</p>
  
  <p>Onclick of "prev" or "next", the calendar should: -</p>
  
  <ol>
  <li>Go to the previous/next month accordingly.</li>
  <li>Set the first day of that month as the current selected date.</li>
  <li>alert that date</li>
  </ol>
  
  <p>The problem is with #2. </p>
  
  <p>I am using <a href="http://docs.jquery.com/UI/Datepicker#method-setDate" rel="noreferrer">setDate</a> to do that, and it is ending up in infinite recursion. Because, I am calling setDate inside onChangeMonthYear. And setDate is also firing onChangeMonthYear internally.</p>
  
  <p>How can I achieve those 3 things when prev/next is clicked.</p>