I'm using jQueryUI datepicker.
$('#myDiv').datepicker({
   onSelect: function(dateText){
      //my function
   });
});
dateText comes as yymmdd
Now is a Jan. I can select a current month's date (1-31) or other month's date (30, 31 Dec. and 1,2 Feb.)
My question is - can we check what month was selected (current, prev. or next) and create a if/else statement inside onSelect?
Something like  
$('#myDiv').datepicker({
  onSelect: function(dateText){
    if( prevMonth ){
      //my function 1
    }else if ( nextMonth ){
      //my function 2
    }else{ //currentMonth
      //my function 3 
  });
});
Thanks!
 
     
    