formtastic_datepicker_inputs
formtastic_datepicker_inputs copied to clipboard
uninitialized constant Formtastic::SemanticFormBuilder (NameError)
SemanticFormBuilder is now deprecated
Here's some working code:
class DatepickerInput < Formtastic::Inputs::StringInput
def input_html_options
format = Time::DATE_FORMATS[:american] || "%m/%d/%Y"
super.merge(:"data-datepicker" => true, :value => object.send(method).try(:strftime, format))
end
end
see: https://github.com/justinfrench/formtastic#creating-new-inputs-based-on-existing-ones