title: jQuery Datepicker: User Going to Next Month or Previous Month?
body: <p>I need to repopulate the datepicker with custom css after the user either clicks the 'Next' month or the 'Previous' month. I'm tapping into the onChangeMonthYear event but don't know which way the user is going (next month or previous month). Is there anything simple built in that would give me this? If not, what is the simplest solution? </p>
  
  <p><strong>* Adding code here to clarify Please note that the events will actually come in via server-side and I've just dummied out some data here while I build*</strong></p>
  
  <pre><code> var Event = function(text, className) {
              this.text = text;
              this.className = className;
          };
  
          var events = {};
          events[new Date("11/12/2012")] = new Event("A Good Day", "yellowDot");
          events[new Date("11/20/2012")] = new Event("Mkay", "blueDot");
  
          $('#date').datepicker({              
             beforeShowDay: function (date) {
                 var event = events[date];
                 if(event) {
                     return [true, event.className, event.text];
                 }
                 else {
                     return [true, '', ''];
                 }
             },
             onChangeMonthYear: function () {
                 //reload another calendar, past or future?
  
             }
          });
  </code></pre>