Class: DateRangeInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- DateRangeInput
- Defined in:
- app/inputs/date_range_input.rb
Instance Method Summary collapse
Instance Method Details
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/inputs/date_range_input.rb', line 2 def input() start_date = [:start_date] || :start_date end_date = [:end_date] || :end_date template.content_tag(:div, class: 'input-group date form_datetime') do template.concat @builder.text_field start_date, class: "daterangepicker js-start_date" template.concat span_seperator template.concat @builder.text_field end_date, class: "daterangepicker js-end_date" end end |
#span_seperator ⇒ Object
12 13 14 15 16 |
# File 'app/inputs/date_range_input.rb', line 12 def span_seperator template.content_tag(:span, class: 'daterangepicker-seperator') do template.concat "to" end end |