Skip to content

Commit a3df6dd

Browse files
committed
Calendar: Add comment in _needsRefresh method
1 parent d9ee3a1 commit a3df6dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/calendar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ return $.widget( "ui.calendar", {
142142

143143
_needsRefresh: function() {
144144
if ( this.date.month() !== this.viewDate.month() || this.date.year() !== this.viewDate.year() ) {
145+
146+
// Check if the needed day is already present in our grid due
147+
// to eachDay option changes (eg. other-months demo)
145148
return !this.grid.find(
146149
this._sanitizeSelector( "#" + this._getDayId( this.date ) )
147150
).length;

0 commit comments

Comments
 (0)