Thursday, March 24, 2011

[Rails] Highlight day if an event takes place (event_calendar gem)

Hi,

I'm busy editing the event_calendar gem a little bit so the background
of a day-number (on the displaying calendar) will turn red if an event
takes place on that day.
This is the code I have at the moment: https://gist.github.com/885960

See line #14 for the exact code to turn the background color of the
day-number to red.
I have debugged this and tested:

event and (day.to_date == dates[0])
it returned true!

So why isn't this particular day coloring red?

I have tried just putting this:
cal << %(ec-event-header )

But then all the day-numbers have a red background for the current
month

Thx!
Mathew

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate