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

calendar hide events

Expand Messages
  • Dave
    Is there currently any way to fire an event upon a calendar being hidden? There are events for selecting, deselecting and the like, but nothing for hiding.
    Message 1 of 4 , Oct 26, 2007
      Is there currently any way to fire an event upon a calendar being
      hidden? There are events for selecting, deselecting and the like, but
      nothing for hiding. Is there a recommended substitute if I need to
      know when the calendar actually is hidden without needing to know
      exactly why its hidden?
    • Satyen Desai
      Hi Dave, The Calendar doesn t currently expose a hide/beforeHide (or show/beforeShow) events, but will for the next release. For the current code, the cleanest
      Message 2 of 4 , Oct 27, 2007
        Hi Dave,
        The Calendar doesn't currently expose a hide/beforeHide (or
        show/beforeShow) events, but will for the next release.

        For the current code, the cleanest alternative would probably be to
        over-ride the hide method and introduce your own custom event.

        Regards,
        Satyen
      • christianhlange
        Hi, i m trying to implement the hide calendar event override and am having some trouble. I m a relative newbie so could you please provide some sample code.
        Message 3 of 4 , Dec 1, 2007
          Hi,
          i'm trying to implement the hide calendar event override and am having
          some trouble. I'm a relative newbie so could you please provide some
          sample code. Here's what i'm trying to do:

          YAHOO.example.cal1.hide = function() {
          alert("some message");

          // then allow the calendar to hide
          // i'm not sure how to do this, when i insert this.hide() it
          creates a circular loop.

          }

          Thanks!




          --- In ydn-javascript@yahoogroups.com, "Satyen Desai" <sdesai@...> wrote:
          >
          > Hi Dave,
          > The Calendar doesn't currently expose a hide/beforeHide (or
          > show/beforeShow) events, but will for the next release.
          >
          > For the current code, the cleanest alternative would probably be to
          > over-ride the hide method and introduce your own custom event.
          >
          > Regards,
          > Satyen
          >
        • Satyen Desai
          Hi, Here s the classical extension approach: http://yuiblog.com/sandbox/yui/v231/examples/calendar/customHide.html (see: http://developer.yahoo.com/yui/yahoo/)
          Message 4 of 4 , Dec 3, 2007
            Hi,
            Here's the classical extension approach:
            http://yuiblog.com/sandbox/yui/v231/examples/calendar/customHide.html

            (see: http://developer.yahoo.com/yui/yahoo/)

            However, if this is the only thing you're over-riding it may seem a
            little excessive to introduce a new class.

            JavaScript being JavaScript, you can also go with a lighter approach:

            http://yuiblog.com/sandbox/yui/v231/examples/calendar/customHide2.html
            Add instance method, call prototype - only modifies one instance

            http://yuiblog.com/sandbox/yui/v231/examples/calendar/customHide3.html
            Over-ride prototype, call backed up prototype - modifies all instances

            Hope that helps,
            Satyen

            p.s. NOTE: 2.4.0, due out this month, has support for hide/show
            beforeHide/beforeShow events for Calendar and CalendarGroup built in.

            It maybe worth waiting for this release if possible.
          Your message has been successfully submitted and would be delivered to recipients shortly.