Skip to content

Commit 0ad5ac7

Browse files
committed
Datepicker: avoid ambiguous + ++ in min file. Partial fix for #5576 - invalid increment operand
1 parent 37e8dd6 commit 0ad5ac7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ $.extend(Datepicker.prototype, {
153153
}
154154
var nodeName = target.nodeName.toLowerCase();
155155
var inline = (nodeName == 'div' || nodeName == 'span');
156-
if (!target.id)
157-
target.id = 'dp' + (++this.uuid);
156+
if (!target.id) {
157+
this.uuid += 1;
158+
target.id = 'dp' + this.uuid;
159+
}
158160
var inst = this._newInst($(target), inline);
159161
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
160162
if (nodeName == 'input') {
@@ -285,7 +287,8 @@ $.extend(Datepicker.prototype, {
285287
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
286288
var inst = this._dialogInst; // internal instance
287289
if (!inst) {
288-
var id = 'dp' + (++this.uuid);
290+
this.uuid += 1;
291+
var id = 'dp' + this.uuid;
289292
this._dialogInput = $('<input type="text" id="' + id +
290293
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
291294
this._dialogInput.keydown(this._doKeyDown);

0 commit comments

Comments
 (0)