Calendar: Add comment in _needsRefresh method

This commit is contained in:
Felix Nagel 2015-04-11 00:04:33 +02:00
parent d9ee3a1ec4
commit a3df6dd8a8

View File

@ -142,6 +142,9 @@ return $.widget( "ui.calendar", {
_needsRefresh: function() { _needsRefresh: function() {
if ( this.date.month() !== this.viewDate.month() || this.date.year() !== this.viewDate.year() ) { if ( this.date.month() !== this.viewDate.month() || this.date.year() !== this.viewDate.year() ) {
// Check if the needed day is already present in our grid due
// to eachDay option changes (eg. other-months demo)
return !this.grid.find( return !this.grid.find(
this._sanitizeSelector( "#" + this._getDayId( this.date ) ) this._sanitizeSelector( "#" + this._getDayId( this.date ) )
).length; ).length;