I’ve been trying to make this calendar_date_picker to work for more
than two days, but without success.
I’ve tried installing it as a gem:
- gem install calendar_date_select
- include it in the gemfile, then run bundle install
- Since rake calendar:install does NOT work… I manually placed each
file that I downloaded from the github into the asset repository
(rails 3.2) OR public folder (rails 3.0.5). - I have placed this line in the environment.rb file:
config.gem “calendar_date_select”, :lib =>”calendar_date_select” - I have included the following in the application header:
<%= javascript_include_tag :defaults %>
<%= calendar_date_select_includes “blue” %> - I tried testing it in my views, but I always end up with this:
undefined method `calendar_date_select_tag’ for #<#:
0x3ec49a8>21: <%= link_to ‘Edit’, edit_order_path(order) %> 22:
<%= link_to ‘Destroy’, order, :confirm => ‘Are you sure?’,
:method => :delete %>23:
24: <%= calendar_date_select_tag “e_date” %>
25: <% end %>
26:
- I’ve hacked into the lib/calendar_date_select.rb and changed /
public into /app/assets for rails 3.2.
For some reason, it doesn’t recognize the calendar_date_select method.
Could someone please help me. Thanks in advance.
It better to use jquery instead of using thirdparty calender on 3.2 . Here is one of the links
Jquery Datepicker demo
Please check this link too.