"click .ui-calendar-prev": function( event ) {
event.preventDefault();
this.date.adjust( "M", -this.options.numberOfMonths );
- this._refresh();
+ this.viewDate.setTime( this.date.date().getTime() );
+ this.refresh();
},
"click .ui-calendar-next": function( event ) {
event.preventDefault();
this.date.adjust( "M", this.options.numberOfMonths );
- this._refresh();
+ this.viewDate.setTime( this.date.date().getTime() );
+ this.refresh();
},
"mousedown .ui-calendar-calendar button": function( event ) {
event.preventDefault();
);
this.refresh();
} else {
- this._refresh();
+ this.viewDate.setTime( this.date.date().getTime() );
+ this.refresh();
}
this.grid.focus();
}
this.buttonPane.appendTo( this.element );
},
- _refresh: function() {
- this.viewDate.setTime( this.date.date().getTime() );
- this.refresh();
- },
-
// Refreshing the entire calendar during interaction confuses screen readers, specifically
// because the grid heading is marked up as a live region and will often not update if it's
// destroyed and recreated instead of just having its text change. Additionally, interacting
this.viewDate.setAttributes( this._calendarDateOptions );
}
if ( refresh ) {
- this._refresh();
+ this.viewDate.setTime( this.date.date().getTime() );
+ this.refresh();
}
},