views:

18

answers:

0

I'm trying to get the calendar_date_select gem working. I've added <%= calendar_date_select_includes 'blue' %> to my layout, and the actual helper call I'm trying as a test is <%= calendar_date_select_tag "e_date" %> (from the demo page)

The problem is that when I click on the calendar icon, nothing happens, and Chrome's element inspector says Uncaught TypeError: Object#<an Object> has no method 'previous'. The actual js call is onclick="new CalendarDateSelect( $(this).previous(), {year_range:10} );"

calendar_date_select also relies on prototype, and I've done <%= javascript_include_tag :defaults %> so they're in there.

I also initially had a problem were the helpers weren't being recognized, but some searching found this fix, which I did, and after that, I was able to use the helper method. So my problem might be related to that, but I don't think it is.

Can anyone help me trying to figure out what's wrong here?

EDIT:

It turns out that using jquery and protoype can cause some conflicts, and since I'm using both, I found this bug report that told me to include jQuery.noConflict(); in the layout, and now it works just fine.

Hope someone finds this useful someday