Skip to content

Commit

Permalink
magento/magento2:magento#4136 - Widget condition with unexpected char…
Browse files Browse the repository at this point in the history
…acter not preventing from saving

- Added autocomplete option for calendar.js
  • Loading branch information
Vasilii Burlacu committed Nov 13, 2018
1 parent 6c87bb3 commit 1d1d061
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/web/mage/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
* Widget calendar
*/
$.widget('mage.calendar', {
options: {
autoComplete: true
},

/**
* Merge global options with options passed to widget invoke
Expand Down Expand Up @@ -378,6 +381,8 @@
.text('') // Remove jQuery UI datepicker generated image
.append('<span>' + pickerButtonText + '</span>');

$(element).attr('autocomplete', this.options.autoComplete ? 'on' : 'off');

this._setCurrentDate(element);
},

Expand Down

0 comments on commit 1d1d061

Please sign in to comment.