Skip to content

Instantly share code, notes, and snippets.

@shrmnk
Created November 1, 2017 06:11
Show Gist options
  • Save shrmnk/e5577b2a2176193cfbd6b92462cf5923 to your computer and use it in GitHub Desktop.
Save shrmnk/e5577b2a2176193cfbd6b92462cf5923 to your computer and use it in GitHub Desktop.
Simple Form Datepicker Input
class DatepickerInput < SimpleForm::Inputs::Base
def input(wrapper_options)
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
@builder.text_field(attribute_name, merged_input_options) + \
@builder.hidden_field(attribute_name, { :class => attribute_name.to_s + "-alt"})
end
end
@shrmnk
Copy link
Author

shrmnk commented Nov 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment