Class: Archangel::DateTimePickerInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
app/inputs/archangel/date_time_picker_input.rb

Overview

Datetime picker custom input for SimpleForm

Instance Method Summary collapse

Instance Method Details

#input(wrapper_options = nil) ⇒ Object

Build input field

Parameters:

  • wrapper_options (Hash) (defaults to: nil)

    the wrapper options


13
14
15
16
17
18
# File 'app/inputs/archangel/date_time_picker_input.rb', line 13

def input(wrapper_options = nil)
  merged_input_options =
    merge_wrapper_options(input_html_options, wrapper_options)

  @builder.text_field(attribute_name, merged_input_options)
end

#input_html_classesObject

Add `datetimepicker` as an HTML class


23
24
25
# File 'app/inputs/archangel/date_time_picker_input.rb', line 23

def input_html_classes
  super.push("datetimepicker")
end