Skip to content

Commit 15fcf0a

Browse files
Refactors _updateAlternate() method
As far as i'm aware .each(function() { $(this).val( ... ) }); is not required to update the value of all elements in the set of matched element.
1 parent 0cc197a commit 15fcf0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/widgets/datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ $.extend( Datepicker.prototype, {
10891089
altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
10901090
date = this._getDate( inst );
10911091
dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
1092-
$( altField ).each( function() { $( this ).val( dateStr ); } );
1092+
$( altField ).val( dateStr );
10931093
}
10941094
},
10951095

0 commit comments

Comments
 (0)