Class: ActiveAdmin::Inputs::DatepickerInput

Inherits:
Formtastic::Inputs::StringInput
  • Object
show all
Defined in:
lib/active_admin/inputs/datepicker_input.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



5
6
7
8
9
10
11
# File 'lib/active_admin/inputs/datepicker_input.rb', line 5

def input_html_options
  super.tap do |options|
    options[:class] = [options[:class], "datepicker"].compact.join(" ")
    options[:data] ||= {}
    options[:data].merge! datepicker_options
  end
end

#label_from_optionsObject

Can pass proc to filter label option



14
15
16
17
18
# File 'lib/active_admin/inputs/datepicker_input.rb', line 14

def label_from_options
  res = super
  res = res.call if res.is_a? Proc
  res
end