Class: DateTimePickerInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- DateTimePickerInput
- Defined in:
- app/inputs/date_time_picker_input.rb
Overview
app/inputs/date_time_picker_input.rb
Instance Method Summary collapse
Instance Method Details
#icon_calendar ⇒ Object
25 26 27 |
# File 'app/inputs/date_time_picker_input.rb', line 25 def icon_calendar "<i class='fa fa fa-calendar'></i>".html_safe end |
#input ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/inputs/date_time_picker_input.rb', line 4 def input template.content_tag(:div, class: 'form-group') do template.content_tag(:div, class: 'input-group date') do template.concat span_calendar template.concat @builder.text_field(attribute_name, ) #template.concat span_remove #template.concat span_table end end end |
#input_html_options ⇒ Object
15 16 17 |
# File 'app/inputs/date_time_picker_input.rb', line 15 def {class: 'form-control', readonly: true} end |
#span_calendar ⇒ Object
19 20 21 22 23 |
# File 'app/inputs/date_time_picker_input.rb', line 19 def span_calendar template.content_tag(:span, class: 'input-group-addon') do template.concat icon_calendar end end |