Open jzellman opened 11 years ago
No initializer is needed. I believe you're looking for calendar_date_select_tag
(i.e. missing the _tag
part).
I think calendar_date_select
is available only from a form (e.g. form_for blabla do |f| ; f.calendar_date_select :some_field; ...
)
PS: there's a calendar_date_select_includes
helper you can use for the js/css if you like.
Closing, but I'll reopen if need be.
Thanks for the help, calendar_date_select_includes
fixed the loading of the javascripts and stylesheets.
I'm still having an issue using f.calendar_date_select
. I don't think it is a problem with calendar_date_select since I created a vanilla Rails 3.2.13 application and it worked fine there.
Unfortunately the app I inherited is a rather large app with a lot of gem dependencies. For now I'll just leave ActionView::Base.send(:include, CalendarDateSelect::FormHelpers)
in an initializer as a stop gap until I can find the offending library.
Thanks again for the help!
Jeff
I have the same issue in a old project upgraded to Rails 4.0.0.
I need to initialize ActionView::Base.send(:include, CalendarDateSelect::FormHelpers) for calendar_date_select_tag and calendar_date_select to work.
Bump
have a look on this fork for Rails 4 https://github.com/bdcheung/calendar_date_select
Hi,
I'm in the process of upgrading an app from Rails 2.3 to 3.2. In order to get the plugin working correctly I had to do the following:
Add calendar date select to the Gemfile:
Add the following to my layout/application (for silver style):
Add the css and js assets to the asset pipeline in config/application.rb:
Create the file config/initializers/calendar_date_select.rb with the following:
Without the config/initializer/calendar_date_select.rb file, the calendar_date_select helper method is no longer available in the views:
So my question is... is a config/initializer file required? Is there a better way to get the helpers loaded in the ActionView context?
Thanks,
Jeff