From 1d1d061ad4eb8c664d9abf9aaa84e7b620a8dd9a Mon Sep 17 00:00:00 2001 From: Vasilii Burlacu Date: Tue, 13 Nov 2018 09:30:40 +0200 Subject: [PATCH] magento/magento2:#4136 - Widget condition with unexpected character not preventing from saving - Added autocomplete option for calendar.js --- lib/web/mage/calendar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/web/mage/calendar.js b/lib/web/mage/calendar.js index 7ddcb7e32f1b0..4d09a5c0fbd84 100644 --- a/lib/web/mage/calendar.js +++ b/lib/web/mage/calendar.js @@ -66,6 +66,9 @@ * Widget calendar */ $.widget('mage.calendar', { + options: { + autoComplete: true + }, /** * Merge global options with options passed to widget invoke @@ -378,6 +381,8 @@ .text('') // Remove jQuery UI datepicker generated image .append('' + pickerButtonText + ''); + $(element).attr('autocomplete', this.options.autoComplete ? 'on' : 'off'); + this._setCurrentDate(element); },