Class: SimpleForm::Inputs::TimepickerInput
- Inherits:
-
StringInput
- Object
- StringInput
- SimpleForm::Inputs::TimepickerInput
- Defined in:
- lib/datetimepicker/simple_form/inputs/timepicker_input.rb
Instance Method Summary collapse
Instance Method Details
#input ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/datetimepicker/simple_form/inputs/timepicker_input.rb', line 8 def input # Remove defaults that we do not want. html_classes.delete(:datepicker) html_classes.push(:datetimepicker) input_html_classes.push(:datetimepicker_time) [:type] = "text" # Get the input in the correct format. [:value] = object.send(attribute_name).try(:strftime, Time::DATE_FORMATS[:datetimepicker_time]) @builder.text_field(attribute_name, ) end |