Ask A Question


You’re not receiving notifications from this thread.

Multiday with calendar gem

John Munyi asked in General

Is possible you shed some more light on this ....

which is the best approach in my event.rb i so fat have this

  class Event < ActiveRecord::Base
    belongs_to :user

 def duration
   end_time - start_time

 def event_length(start_time)
   start_time + (duration*24*60*60)  

wondering how to pass on the value returned by event_length to the calendar and have the event displayed across multiple days


So right now there's no way to do that with simple_calendar. It's a somewhat complicated thing to do to reproduce Google Calendar style multi-day events.

One option you have is to add some code to the view to look for events that started before the current and end on or after it to find multi-day events. You can create a helper to do that or add some code to your controller.

At some point I'll be patching that in simple_calendar to help make it easier.


hey Chris , thanks for the update ... anyother gems you would recommend that would handle that in a simpler mannner ?


Maybe Javascript libraries like but no gems that I'm aware of.


cool... wil check it out .. thanks

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,111+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.