Created
November 1, 2017 06:11
-
-
Save shrmnk/e5577b2a2176193cfbd6b92462cf5923 to your computer and use it in GitHub Desktop.
Simple Form Datepicker Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-up update to the answer on https://stackoverflow.com/questions/24599266/rails-4-simple-form-and-jquery-ui-datepicker-is-not-working-via-turbolinks