I want to be able to style certain calendar events in the month view to be block display with a different background color, things like that. Using CalendarEvent.setEventWindowStyle() doesn't affect the HTML of the month view at all (the CSS class is not added), so then a coworker suggested overriding Calendar.getDayBodyHTML(), like in the compact calendar example in the showcase. That works fine for changing the display, but seeing as you're just outputting raw HTML, it loses the event handling functionality, so nothing happens when you click on the event. Do I just need to copy the HTML SmartClient is outputting, with the Javascript link? Seems like a fragile solution that breaks the GWT paradigm. Any chance of just having setEventWindowStyle() affect month view as well?
Announcement
Collapse
No announcement yet.
X
-
Ah that makes sense. There is a modifiable CSS style for this ("calMonthEventLink") but there's not a dynamic way to change it per-event yet. We'll add that capability - it looks like you're going to make heavy use of the Calendar so please consider sponsoring whatever batch of enhancements you might need to make maximum use of the Calendar.
Comment
-
I've been able to change the background color and header color and text color and font just fine using CSS and CalendarEvent.setEventWindowStyle(). Just copy calendar event part of the stylesheet included in one of the skins, rename it and make sure that the html that loads your calendar application loads that style sheet as well.
Comment
-
I could not get it to change in month view but in other two views, yes.
The problem is that the style can not be changed while in the Event call as in OnEventClick etc UNLESS one does total refresh (setData(...) etc).
That is very expensive operation. I am having difficulty showing a selected Event by clicking it........
Comment
Comment