3 Replies Latest reply on Jul 28, 2009 4:01 PM by maqui01

    Calendar style classes redefinition

      Hi,
      I'm having some problems using the richfaces calendar since I've been doing an organizer and had to redefine a lot of calendar style classes. The problem is that I have others calendars (popup calendars) that I'd like to show using the default classes, but It seems they use the same classes that I redefine in the organizer and it looks ugly. I was looking for a solution to this but I couldn't find anything. I'd be grateful if someone shares to me an answer.

      Cheers.

      Santiago.

        • 1. Re: Calendar style classes redefinition
          ilya_shaikovsky

          you could use css selectors with id. Or just classes attributes instead of common rich-* classes.

          • 2. Re: Calendar style classes redefinition

            Santiago,

            I had the same need in my application.
            I solved using Ilya's suggested method.

            For example wherever I use calendar in organizer fashion I set styleClass attribute to "organizer".

             <rich:calendar popup="false" cellWidth="107px"
             showFooter="false" showApplyButton="false" showWeeksBar="false"
             dataModel="#{calendarDataModel}"
             styleClass="organizer"
             mode="ajax"
             id="organizer">
            


            Then in my css stylesheet I do things like:
            .organizer
            .rich-calendar-days {
             font-weight: bold;
             font-size: 12px;
            }
            

            whereas styles that apply to the non-organizer mode would just be:
            .rich-calendar-days {
             background:#F0F8FF;
            }
            


            Hope this helps.
            -Mark


            • 3. Re: Calendar style classes redefinition

              Thank you very much. I really needed this :D :D

              Cheers.

              Santiago.