Class: ActiveAdmin::Inputs::DatetimepickerInput

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

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



7
8
9
10
11
12
13
# File 'lib/inputs/datetimepicker_input.rb', line 7

def input_html_options
  if options[:datetimepicker_options].nil?
    super.merge(class: 'ui-datetime-picker-input', autocomplete: 'off')
  else
    super.merge(class: 'ui-datetime-picker-input', autocomplete: 'off', datetimepicker_options: options[:datetimepicker_options].to_json)
  end
end

#label_html_optionsObject



19
20
21
22
23
24
# File 'lib/inputs/datetimepicker_input.rb', line 19

def label_html_options
  {
    for: input_html_options[:id],
    class: ['label'] << 'ui-datetime-picker-label'
  }
end

#wrapper_html_options_rawObject



15
16
17
# File 'lib/inputs/datetimepicker_input.rb', line 15

def wrapper_html_options_raw
  { class: 'ui-datetime-picker-wrapper' }.merge(options[:wrapper_html] || {}).dup
end