What are the current best practices in the Rails world for displaying a calendar month view with event items bound to the days in the month (like in Backpack or Google Calendar, for example)?
I don't need anything like fancy stuff like drag and drop support. I'm just looking for code to let me get a list of events in my controller and somehow expose them as entries in a monthly calendar display view (maybe with class names on the HTML elements to allow me to display different types of events differently, or maybe to display events from multiple calendars).
There's the Dynamic Calendar Helper that was created a few years ago, which very well might still work just fine for me, but I'm just wondering if I should be looking at other plugins, too.
Other possibilities I've found so far:
So, can you point me in the right direction as to what folks are using to output monthly calendars with data these days?
Here's a Rails plugin that can display multiple, overlapping events across calendar days.
http://github.com/elevation/event_calendar
Screenshot(s) at: http://dev.elevationblog.com/2009/7/23/event-calendar-rails-plugin
Check out http://github.com/p8/table_builder/tree/master. It works more like form_for. It also doesn't require Event objects, just objects with a method that returns a date.
<% calendar_for(@tasks, :year => @year, :month => @month) do |t| %>
<%= t.head('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun') %>
<% t.day(:day_method => YOUR_DATE_METHOD) do |day, tasks| %>
<%= day.day %><br />
<% tasks.each do |task| %>
<%= h(task.name) %><br />
<% end %>
<% end %>
<% end %>
<% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With