Class: DatePickerInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- DatePickerInput
- Defined in:
- app/inputs/date_picker_input.rb
Direct Known Subclasses
Instance Method Summary collapse
- #data_attributes ⇒ Object
- #icon_table ⇒ Object
- #input ⇒ Object
- #input_html_options ⇒ Object
- #span_table ⇒ Object
Instance Method Details
#data_attributes ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/inputs/date_picker_input.rb', line 9 def data_attributes attributes = {} attributes.reverse_merge!( date_language: I18n.locale, date_format: 'dd/mm/yyyy' ) end |
#icon_table ⇒ Object
17 18 19 |
# File 'app/inputs/date_picker_input.rb', line 17 def icon_table template.content_tag(:span, '', class: 'fa fa-th') end |
#input ⇒ Object
2 3 4 5 6 7 |
# File 'app/inputs/date_picker_input.rb', line 2 def input template.content_tag(:div, class: 'input-group') do template.concat @builder.text_field(attribute_name, ) template.concat span_table end end |
#input_html_options ⇒ Object
21 22 23 |
# File 'app/inputs/date_picker_input.rb', line 21 def super.merge(class: 'form-control', readonly: true, data: data_attributes) end |
#span_table ⇒ Object
25 26 27 28 29 |
# File 'app/inputs/date_picker_input.rb', line 25 def span_table template.content_tag(:span, class: 'input-group-addon') do template.concat icon_table end end |