Skip to content

Commit 1d1d061

Browse files
author
Vasilii Burlacu
committed
magento/magento2:#4136 - Widget condition with unexpected character not preventing from saving
- Added autocomplete option for calendar.js
1 parent 6c87bb3 commit 1d1d061

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/web/mage/calendar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
* Widget calendar
6767
*/
6868
$.widget('mage.calendar', {
69+
options: {
70+
autoComplete: true
71+
},
6972

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

384+
$(element).attr('autocomplete', this.options.autoComplete ? 'on' : 'off');
385+
381386
this._setCurrentDate(element);
382387
},
383388

0 commit comments

Comments
 (0)