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

Change Calendar Position Programmatically?

Expand Messages
  • aokjoey
    Title says it all: I want to position the calender in the center of the viewport regardless of the page s scroll position. Any pointers are appreciated, the
    Message 1 of 5 , Nov 1, 2007
    • 0 Attachment
      Title says it all: I want to position the calender in the center of
      the viewport regardless of the page's scroll position.

      Any pointers are appreciated, the API isn't obvious about this.
      Thanks!
      Joe
    • dav.glass@yahoo.com
      Joe -- This example should help: http://blog.davglass.com/files/yui/cal8/ Basically, wrap the Calendar in an Overlay Control. Hope that helps :) Dav Dav Glass
      Message 2 of 5 , Nov 1, 2007
      • 0 Attachment
        Joe --

        This example should help:
        http://blog.davglass.com/files/yui/cal8/

        Basically, wrap the Calendar in an Overlay Control.

        Hope that helps :)
        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: aokjoey <joe@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Thursday, November 1, 2007 8:43:02 AM
        Subject: [ydn-javascript] Change Calendar Position Programmatically?

        Title says it all: I want to position the calender in the center of
        the viewport regardless of the page's scroll position.

        Any pointers are appreciated, the API isn't obvious about this.
        Thanks!
        Joe




        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/


      • Eric Miraglia
        Joe, The YUI Panel Control (and others in the Container Family) have a fixedcenter configuration property. Your best bet here is to create your calendar
        Message 3 of 5 , Nov 1, 2007
        • 0 Attachment
          Joe,

          The YUI Panel Control (and others in the Container Family) have a "fixedcenter" configuration property.  Your best bet here is to create your calendar inside a Panel and set the fixedcenter configuration to true (it's false by default).

          Here's an example of that:

          ______________________________________________
          Eric Miraglia
          Yahoo! User Interface Library


          On Nov 1, 2007, at 8:43 AM, aokjoey wrote:

          Title says it all: I want to position the calender in the center of
          the viewport regardless of the page's scroll position.

          Any pointers are appreciated, the API isn't obvious about this.
          Thanks!
          Joe


        • Timothy Lynn
          On a similar note, are there any examples of having the calendar intelligently position itself so that it doesn t appear off-screen? For instance, if I have a
          Message 4 of 5 , Nov 1, 2007
          • 0 Attachment
            On a similar note, are there any examples of having the calendar
            intelligently position itself so that it doesn't appear off-screen?
            For instance, if I have a calendar icon positioned on the right side
            of the page, clicking it might make the calendar appear off to the
            right, making the viewport expand to accommodate it. I'm looking for
            something reuseable so that the same calendar code can be used on any
            page, regardless of where the icon is.

            Thanks,
            Tim

            On 11/1/07, Eric Miraglia <miraglia@...> wrote:
            >
            > Joe,
            >
            >
            > The YUI Panel Control (and others in the Container Family) have a "fixedcenter" configuration property. Your best bet here is to create your calendar inside a Panel and set the fixedcenter configuration to true (it's false by default).
            >
            >
            > Here's an example of that:
            >
            >
            >
            > http://yuiblog.com/sandbox/yui/v231/examples/calendar/calendarpanel.html
            >
            >
            > Regards,
            > Eric
            >
            >
            >
            >
            > ______________________________________________
            > Eric Miraglia
            > Yahoo! User Interface Library
            >
            >
            >
            > On Nov 1, 2007, at 8:43 AM, aokjoey wrote:
            >
            >
            >
            >
            >
            >
            >
            > Title says it all: I want to position the calender in the center of
            > the viewport regardless of the page's scroll position.
            >
            > Any pointers are appreciated, the API isn't obvious about this.
            > Thanks!
            > Joe


            --
            Tim
          • Eric Miraglia
            Tim, The version I linked to below will take care of that for you. Just delete the fixedcenter configuration and add a constraintoviewport configuration (set
            Message 5 of 5 , Nov 1, 2007
            • 0 Attachment
              Tim,

              The version I linked to below will take care of that for you.  Just delete the fixedcenter configuration and add a constraintoviewport configuration (set to true) for the Panel instance in which the Calendar instance lives.

              You can then use the context element positioning featured in Panel to position the panel exactly where you want it relative to a context element but intelligently move it back into the viewport if the default position has it clipped.

              Regards,
              Eric




              ______________________________________________
              Eric Miraglia
              Yahoo! User Interface Library


              On Nov 1, 2007, at 11:01 AM, Timothy Lynn wrote:

              On a similar note, are there any examples of having the calendar
              intelligently position itself so that it doesn't appear off-screen?
              For instance, if I have a calendar icon positioned on the right side
              of the page, clicking it might make the calendar appear off to the
              right, making the viewport expand to accommodate it. I'm looking for
              something reuseable so that the same calendar code can be used on any
              page, regardless of where the icon is.

              Thanks,
              Tim

              On 11/1/07, Eric Miraglia <miraglia@yahoo- inc.com> wrote:
              >
              > Joe,
              >
              >
              > The YUI Panel Control (and others in the Container Family) have a "fixedcenter" configuration property. Your best bet here is to create your calendar inside a Panel and set the fixedcenter configuration to true (it's false by default).
              >
              >
              > Here's an example of that:
              >
              >
              >
              > http://yuiblog. com/sandbox/ yui/v231/ examples/ calendar/ calendarpanel. html
              >
              >
              > Regards,
              > Eric
              >
              >
              >
              >
              > ____________ _________ _________ _________ _______
              > Eric Miraglia
              > Yahoo! User Interface Library
              >
              >
              >
              > On Nov 1, 2007, at 8:43 AM, aokjoey wrote:
              >
              >
              >
              >
              >
              >
              >
              > Title says it all: I want to position the calender in the center of
              > the viewport regardless of the page's scroll position.
              >
              > Any pointers are appreciated, the API isn't obvious about this.
              > Thanks!
              > Joe

              -- 
              Tim


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