Skip to content

Commit d2d301f

Browse files
committed
Datepicker: Use 'that' instead of 'self'. Partial fix for #5404 - remove uses of 'var self = this;'
1 parent 41a1472 commit d2d301f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,7 @@ $.extend(Datepicker.prototype, {
711711

712712
/* Generate the date picker content. */
713713
_updateDatepicker: function(inst) {
714-
var self = this;
715-
self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
714+
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
716715
var borders = $.datepicker._getBorders(inst.dpDiv);
717716
instActive = inst; // for delegate hover events
718717
inst.dpDiv.empty().append(this._generateHTML(inst));
@@ -802,10 +801,10 @@ $.extend(Datepicker.prototype, {
802801
if (this._datepickerShowing) {
803802
var showAnim = this._get(inst, 'showAnim');
804803
var duration = this._get(inst, 'duration');
805-
var self = this;
804+
var that = this;
806805
var postProcess = function() {
807806
$.datepicker._tidyDialog(inst);
808-
self._curInst = null;
807+
that._curInst = null;
809808
};
810809

811810
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed

0 commit comments

Comments
 (0)