Merge pull request #6430 from opf/fix/28017/disable-autocomplete-datepicker

[28017] Disable autocomplete for all datepicker fields

[ci skip]
pull/6431/head
Oliver Günther 6 years ago committed by GitHub
commit 1a9431c113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/helpers/application_helper.rb
  2. 3
      frontend/src/app/modules/common/op-date-picker/datepicker.ts

@ -438,7 +438,9 @@ module ApplicationHelper
# Ensure global AV context exists (when, e.g., called from widget)
@_request ||= request
include_calendar_headers_tags
nonced_javascript_tag("jQuery(function() { jQuery('##{field_id}').datepicker(); })")
nonced_javascript_tag <<-EOS
jQuery(function() { jQuery('##{field_id}').attr('autocomplete', 'off').datepicker(); });
EOS
end
def include_calendar_headers_tags

@ -58,6 +58,9 @@ export class DatePicker {
});
this.datepickerInstance = this.datepickerCont.datepicker(mergedOptions);
// Disable autocomplete to avoid overlay
this.datepickerCont.attr('autocomplete', 'off');
}
public clear() {

Loading…
Cancel
Save