Centring the Popup

9 posts, 1 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 11 Jun 2009 Link to this post

    I have a page that appears in a RadWindow.

    The page contains a number of input controls, including RadDatePickers.

    If the picker is close to the bottom of the screen the popup causes the page to 'grow' scrollbars.

    I thought it would be nice to simply centre the popup but I'm struggling.

    I started to use your example code for "Displaying The Popup Above The Input Area" as a basis. I tried to wire up the "OnButtonClick" client event rather than the "OnKeyPress" as in your example, but I can't seem to get it to fire.

    I then, unthinkingly, tried to use the "OnPopupOpening" client event of the RadDatePicker, but - and it's obvious now - that doesn't work 'cos the same code is repeated endlessly 'cos it's called when showPopup. After that I tried setting the style of the results of the ".get_popupContainer" method to set the position, but that didn't seem to work either.

    Can someone give me a hint?

    TIA

    --
    Stuart
  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 15 Jun 2009 Link to this post

    No replies in here either.

    Do I need to change my aftershave?

    --
    Stuart
  3. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 16 Jun 2009 Link to this post

    Hello Stuart,

    You can have a look at this online demo and see how the RadDatePicker popup position is changed so that the calendar is displayed above the DateInput.
    Give it a try and let me know if this works for you.

    Sincerely yours,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 16 Jun 2009 Link to this post

    Iana,

    Yes, I've seen that demo; in fact I referred to it in my opening post.

    The problem is that I want the calendar to centre in the window when the user clicks on to DatePicker's calendar button.

    What I need it some help identifying the correct way to call my popup reclocation function, or more correctly, the correct event to call it from.

    As you can see from my original post, I've tried a number of things but have, thus far, failed to hit on the correct combination.

    --
    Stuart
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 16 Jun 2009 Link to this post

    Hello Stuart,

    You may be happy to know that for the next major release (Q2 2009), expected in the beginning of the next month, we will introduce screen boundary detection for the calendar popup as well as explicit popup direction setting for it when expanded. This would be helpful in your case since you will not need any custom javascript logic to control the location where the popup calendar will be displayed.

    Hence I encourage you to try out the Q2 2009 Beta release of the suite which will be announced later today or tomorrow.

    Best,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 16 Jun 2009 Link to this post

    Sebastian,

    Thanks for that.

    I'll have to run that past TPTB at this end.

    Can I infer from your reply that there actually isn't a workaround for my issue?

    --
    Stuart
  7. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 16 Jun 2009 Link to this post

    I've just received the notification and see that there's NO mention oif any changes to RadCalendar...

    --
    Stuart
  8. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 16 Jun 2009 Link to this post

    Hello Stuart,

    This means that you will not need any custom implementation to display the popup calendar/time view in the visible area of the window. I hope this clarification is helpful.

    Stand by for the Q2 2009 Beta release and test it to see the result.

    Regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 16 Jun 2009 Link to this post

    Ta.

    --
    Stuart
Back to Top