Skip to content

Commit 386d4fa

Browse files
authored
Merge pull request #320 from platanus/feat/date_inputs_autocomplete_off
Set autocomplete to off as default option on date inputs
2 parents ec160fa + 64b7ec8 commit 386d4fa

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/inputs/date_range_input.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class DateRangeInput < ActiveAdmin::Inputs::Filters::DateRangeInput
2+
def input_html_options
3+
super.except(:maxlength, :size).merge({ autocomplete: 'off' })
4+
end
5+
end

app/inputs/date_time_picker_input.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def load_control_attributes
2525
load_class(@options[:class])
2626
load_data_attr(:picker_options, value: datetime_picker_options)
2727
load_attr(:maxlength, value: 19)
28+
load_attr(:autocomplete, value: 'off')
2829
load_attr(:value, value: formatted_input_value)
2930
end
3031

0 commit comments

Comments
 (0)