Module: Adminterface::Extensions::Inputs::Filters::DateRangeInput

Defined in:
lib/adminterface/extensions/inputs/filters/date_range_input.rb

Instance Method Summary collapse

Instance Method Details

#fieldsObject



15
16
17
18
19
20
# File 'lib/adminterface/extensions/inputs/filters/date_range_input.rb', line 15

def fields
  template. :div, class: "row g-3" do
    template.(:div, gt_input, class: "col") +
      template.(:div, lt_input, class: "col")
  end
end

#input_html_options_for(input_name, placeholder) ⇒ Object



22
23
24
25
26
# File 'lib/adminterface/extensions/inputs/filters/date_range_input.rb', line 22

def input_html_options_for(input_name, placeholder)
  opts = super
  opts[:class] = "#{opts[:class]} form-control".squish
  opts.merge(plugins_options)
end

#to_htmlObject



6
7
8
9
10
11
12
13
# File 'lib/adminterface/extensions/inputs/filters/date_range_input.rb', line 6

def to_html
  input_wrapping do
    [
      label_html,
      fields
    ].join("\n")&.html_safe
  end
end