diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index e41ae62a3..429253742 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -153,8 +153,10 @@ $.extend(Datepicker.prototype, { } var nodeName = target.nodeName.toLowerCase(); var inline = (nodeName == 'div' || nodeName == 'span'); - if (!target.id) - target.id = 'dp' + (++this.uuid); + if (!target.id) { + this.uuid += 1; + target.id = 'dp' + this.uuid; + } var inst = this._newInst($(target), inline); inst.settings = $.extend({}, settings || {}, inlineSettings || {}); if (nodeName == 'input') { @@ -285,7 +287,8 @@ $.extend(Datepicker.prototype, { _dialogDatepicker: function(input, date, onSelect, settings, pos) { var inst = this._dialogInst; // internal instance if (!inst) { - var id = 'dp' + (++this.uuid); + this.uuid += 1; + var id = 'dp' + this.uuid; this._dialogInput = $(''); this._dialogInput.keydown(this._doKeyDown);