Loading ...
Sorry, an error occurred while loading the content.

Removing days from CalendarGroup

Expand Messages
  • prixpared
    Hi, in my CalendarGroup... how do I get rid of the days (marked in light-blue) that belong to the preceding and following month? I dont want my calendar to
    Message 1 of 4 , May 8, 2007
    View Source
    • 0 Attachment
      Hi,

      in my CalendarGroup... how do I get rid of the days (marked in
      light-blue) that belong to the preceding and following month?

      I dont want my calendar to show redundant days. Only every day once
      (marked in white).

      Thanks for you help and sorry for my bad English :/

      greets
      fritz

      --
    • dav.glass@yahoo.com
      fritz -- You could add something like this to your CSS after the calendars css file: .yui-calcontainer td.calcelltop.oom { color: #eee; }
      Message 2 of 4 , May 8, 2007
      View Source
      • 0 Attachment
        fritz --

        You could add something like this to your CSS after the calendars css file:

        .yui-calcontainer td.calcelltop.oom {
            color: #eee;
        }
        .yui-calcontainer.first td.calcellbottom.oom {
            color: #eee;
        }
        .yui-calcontainer.first td.calcelltop.oom {
            color: #999;
        }

        Hope that help :)
        Dav
         
        Dav Glass
        dav.glass@...
        blog.davglass.com


        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +


        ----- Original Message ----
        From: prixpared <prixpared@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, May 8, 2007 3:55:29 PM
        Subject: [ydn-javascript] Removing days from CalendarGroup

        Hi,

        in my CalendarGroup... how do I get rid of the days (marked in
        light-blue) that belong to the preceding and following month?

        I dont want my calendar to show redundant days. Only every day once
        (marked in white).

        Thanks for you help and sorry for my bad English  :/

        greets
        fritz

        --








        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
            http://groups.yahoo.com/group/ydn-javascript/

        <*> Your email settings:
            Individual Email | Traditional

        <*> To change settings online go to:
            http://groups.yahoo.com/group/ydn-javascript/join
            (Yahoo! ID required)

        <*> To change settings via email:
            mailto:ydn-javascript-digest@yahoogroups.com
            mailto:ydn-javascript-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
            ydn-javascript-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
            http://docs.yahoo.com/info/terms/


      • Satyen Desai
        Hi Fritz, This would need to be implemented as a Calendar customization. It s not functionality which is configurable. You can either: 1). Overwrite the
        Message 3 of 4 , May 8, 2007
        View Source
        • 0 Attachment

          Hi Fritz,

          This would need to be implemented as a Calendar customization. It's not functionality which is configurable.

          You can either:

          1). Overwrite the default implementation of the renderer for OOM Dates : YAHOO.widget.CalendarGroup.prototype.renderCellNotThisMonth

          Your custom implementation will not render the OOM date

          e.g. Add the following after you include the calendar js file...

          <script type="text/javascript">
             YAHOO.widget.CalendarGroup.prototype.renderCellNotThisMonth = function(workingDate, cell)  {

                YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_OOM); 
                return YAHOO.widget.Calendar.STOP_RENDER;

             };
          </script>

          If you're expecting to change other aspects of the Calendar, then it's best to do this in a custom class which extends, or is augmented with CalendarGroup, as opposed to overwriting the method, but for this one customization, the above it probably fine.

          2). Override the CSS class for OOM dates (as specified by Calendar.Style.CSS_CELL_OOM)

             .yui-calendar td.calcell.oom {
                color:#EEE;
             }

          The second option doesn't actually change the contents of the cell (they will still have the dates inside them) but just sets the text color to match the background color, so the text is not visible.

          Hope that helps,

          Satyen

        • prixpared
          thanks! both solutions work fine! greets fritz
          Message 4 of 4 , May 9, 2007
          View Source
          • 0 Attachment
            thanks! both solutions work fine!

            greets
            fritz
          Your message has been successfully submitted and would be delivered to recipients shortly.