Weird position for RadDateTimePicker pop-up on RadWindow

3 posts, 1 answers
  1. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 22 Mar 2011 Link to this post

    Hi all,

    I have a RadDateTimePicker inside of a RadWindow which has smallish dimensions (400x500 pixels). I would like the pop-up to appear inside of this window, but instead it appears partially off-screen and causes weird resizing issues. How can I achieve this?

    EnableScreenBoundaryDetection is set to true.
    I tried playing around with the pop-up direction but didn't see what I wanted. It is currently set to upper-right.

    Before/After shots attached.

    Thanks for your help.

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Mar 2011 Link to this post

    Hello Sean,

    The RadWindow control is basically an IFRAME and you cannot have DHTML elements lay above that IFRAME. One suggestion is to try the approach used in this demo. There using the OnPopupOpening and OnPopupClosing event handlers of the RadDatePicker control and call the autoSize() method of the window object with a small timeout.

    Or if you don't want a fixed width window, you can set the window property AutoSize to True, which will automatically resize the window according to its content page

    If you want to show the RadDateTimePicker above the RadWindow ,Then better approach is to use window with ContentTemplate as shown in the demo below:
    Window  / Use as controls container
    This will allow the datepicker to show outside the RadWindow boundaries since it will be on the same page.

    Now your window will be like
    <telerik:RadWindow  ID="UserListDialog"  runat="server"  >
                   <telerik:RadDatePicker ID=picker runat=server></telerik:RadDatePicker>

  3. DevCraft R3 2016 release webinar banner
  4. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 23 Mar 2011 Link to this post

    Hi Shinu,

    Thanks for your quick response.

    I am happy with the solution provided in the demo. I also applied HTML css overflow-y: hidden; so that the scrollbars don't show up when it is auto-resizing.


    EDIT: Actually, I found one problem: Once the pane has resized properly if I lose focus on the DatePicker it doesn't resize again. Why doesn't this trigger the OnPopupClosing event?
Back to Top