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

Re: [ydn-javascript] Change Calendar Position Programmatically?

Expand Messages
  • 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 1 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.