Skip to content

Custom input_html for DateRangeInput #5864

@mirelon

Description

@mirelon

I want to provide custom html option (autocomplete: :off) for DateRangeInput.
I use this filter:

filter :created_at, as: :date_range, input_html: {autocomplete: :off}

Expected behavior

HTML element with attribute autocomplete="off"

Actual behavior

HTML element is without that attribute.

DateRangeInput https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/inputs/filters/date_range_input.rb does not allow custom "input_html" options.

Other filters (like DatePickerInput) merges the "input_html" options:

    def input_html_options
      super.merge(class: "datepicker")
    end

Should DateRangeInput do the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions