Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar month view - day events style

    Hi all.

    Is there a way to change the event style text inside the day body in the month view?

    I would like to give a visual feedback to the users about each event, like for instance, show the event name in red when it's failed, green when it's running and gray when it's done.

    This may be done by inserting a div with a class when in month view for each day body.

    Thanks.

    #2
    Can anyone help me with this? Please?

    Comment


      #3
      I am looking for something similar to this. I want to be able to change the dayBodyBaseStyle depending on the events on that day. More specifically I want to change the background color on the days that have events. My Calendar is somewhat similar to the Compact Calendar from the showcase.

      When I overwrite getDayBodyHTML for my Calendar I have access to the date and the events through the arguments, but when I overwrite getDayBodyBaseStyle it has no arguments so I cannot return a style based on what the events are on a specific date.

      Using getDayBodyHTML to return a div with a style doesn't work either since the div won't cover the whole day layout.

      Do you have any suggestions on how I can style a dayBody based on events?

      Comment


        #4
        getDayBodyBaseStyle() isn't an override point. There's no publicly available, Calendar or CalendarView-level API to do this.

        For cell-styling itself, you could do that by overriding the (ListGrid) API getBaseStyle() on a CalendarView instance and using setAutoChildProperties("monthView", props) - that would aloow you to change the base style for a cell (so it's stateful) - from there, though, you'd probably need to get involved in some JSNI, because there isn't currently a public API like getCellEvents(), to detect that a cell has events in the monthView. The rows in the grid hold such information internally, but not in a way that's easily accessible from Java.

        Comment

        Working...
        X