Skip to content

Loading…

This allows compatibility to the jquery_datepicker plugin with projects that use prototype.js and jquery. #12

Closed
wants to merge 1 commit into from

2 participants

@viniciuscb

Simple changing from a $(...) to jQuery(...)

@albertopq
Owner

You need to change the spec tests as well. Now are failing.

Thanks for your contribution!!

@viniciuscb
@albertopq
Owner

After install rails and rspec, it should work..

$ gem install rails
$ gem install rspec
$ cd jquery_datepicker
$ rspec

Don't worry, I'll update the code later :)

Thanks!!

@albertopq albertopq closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2011
  1. @viniciuscb
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/app/helpers/form_helper.rb
View
2 lib/app/helpers/form_helper.rb
@@ -11,7 +11,7 @@ def datepicker(object_name, method, options = {})
dp_options, tf_options = input_tag.split_options(options)
tf_options[:value] = input_tag.format_date(tf_options[:value], String.new(dp_options[:dateFormat])) if tf_options.has_key?(:value) && dp_options.has_key?(:dateFormat)
html = input_tag.to_input_field_tag("text", tf_options)
- html += javascript_tag("jQuery(document).ready(function(){$('##{input_tag.get_name_and_id["id"]}').datepicker(#{dp_options.to_json})});")
+ html += javascript_tag("jQuery(document).ready(function(){jQuery('##{input_tag.get_name_and_id["id"]}').datepicker(#{dp_options.to_json})});")
html.html_safe
end
Something went wrong with that request. Please try again.