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

Re: calendar hide events

Expand Messages
  • 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 1 of 4 , Dec 1, 2007
    • 0 Attachment
      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 2 of 4 , Dec 3, 2007
      • 0 Attachment
        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.