Class: Cdx::DatePickerInput

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

Instance Method Summary collapse

Instance Method Details

#calendarObject



13
14
15
16
17
# File 'app/inputs/cdx/date_picker_input.rb', line 13

def calendar
  template.(:span, class: 'input-group-addon') do
    template.concat('<i class="fa fa-calendar"></i>'.html_safe)
  end
end

#input(wrapper_options) ⇒ Object



2
3
4
5
6
7
# File 'app/inputs/cdx/date_picker_input.rb', line 2

def input(wrapper_options)
  template.(:div, class: 'input-group date form_datetime') do
    template.concat @builder.text_field(attribute_name, input_html_options)
    template.concat calendar
  end
end

#input_html_optionsObject



9
10
11
# File 'app/inputs/cdx/date_picker_input.rb', line 9

def input_html_options
  super.merge(class: 'form-control datepicker')
end