Skip to content

Commit 80fed1b

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 e6323fb commit 80fed1b

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
@@ -380,6 +383,8 @@
380383
.text('') // Remove jQuery UI datepicker generated image
381384
.append('<span>' + pickerButtonText + '</span>');
382385

386+
$(element).attr('autocomplete', this.options.autoComplete ? 'on' : 'off');
387+
383388
this._setCurrentDate(element);
384389
},
385390

0 commit comments

Comments
 (0)