- Install the calendar_date_select gem
gem install calendar_date_select
- Add a gem dependency to your rails project (in environment.rb)
config.gem "calendar_date_select"
- Then, restart/start your rails project. All necessary files will be copied to your public folder.
- Now include this at the top of your layout: (you'll also need to include prototype, if you haven't already!)
<%= calendar_date_select_includes "red" # or "blue", or "silver", or nil for the default! %> # (if you want more control, you can get a list of stylesheets / javascripts via calendar_date_select_javascripts and calendar_date_select_stylesheets)
Rails插件安装、使用(1)——calendar_date_select
最新推荐文章于 2019-07-24 00:00:00 发布