Class: DatePickerInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
lib/generators/tida_template/templates/app/inputs/date_picker_input.rb

Instance Method Summary collapse

Instance Method Details

#inputObject



2
3
4
5
6
7
8
# File 'lib/generators/tida_template/templates/app/inputs/date_picker_input.rb', line 2

def input
  content = []
  content << @builder.text_field(attribute_name, input_html_options)
  icon_content = template.(:i, nil, 'data-time-icon' => 'icon-time', 'data-date-icon' => 'icon-calendar')
  content << template.(:span, icon_content.html_safe, :class => 'add-on')
  template.(:div, content.join.html_safe, :class => 'date datepicker input-append date-picker')
end