Jay Dee
Jay Dee

Reputation: 13

How to install calendar_date_picker in rails 3.2?

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:

  1. gem install calendar_date_select
  2. include it in the gemfile, then run bundle install
  3. 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).
  4. I have placed this line in the environment.rb file: config.gem "calendar_date_select", :lib =>"calendar_date_select"
  5. I have included the following in the application header: <%= javascript_include_tag :defaults %> <%= calendar_date_select_includes "blue" %>
  6. 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:

  1. 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.

Upvotes: 1

Views: 1757

Answers (1)

Arpit Vaishnav
Arpit Vaishnav

Reputation: 4780

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.

Upvotes: 2

Related Questions