class ActiveAdmin::Inputs::DatepickerInput
Public Instance Methods
input_html_options()
click to toggle source
Calls superclass method
# File lib/active_admin/inputs/datepicker_input.rb, line 4 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_options()
click to toggle source
Can pass proc to filter label option
Calls superclass method
# File lib/active_admin/inputs/datepicker_input.rb, line 13 def label_from_options res = super res = res.call if res.is_a? Proc res end
Private Instance Methods
datepicker_options()
click to toggle source
# File lib/active_admin/inputs/datepicker_input.rb, line 20 def datepicker_options options = self.options.fetch(:datepicker_options, {}) options = Hash[options.map{ |k, v| [k.to_s.camelcase(:lower), v] }] { datepicker_options: options } end