This is a migrated thread and some comments may be shown as answers.

show popup above

1 Answer 132 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 2
Piyush Bhatt asked on 21 Apr 2008, 05:57 PM

I have a horizontal menu bar. And then I have IFRAME filling the whole page. Item from menu opens a url inside the IFRAME.

Towards the bottom of the IFRAME - i have a calendar that I am opening up above the calendar button. I got the code from the user manual:

function ShowPopupAbove(sender, eventArgs)
{
 var picker = $find("<%= RadDatePicker1.ClientID %>");
 var textBox
= picker.get_textBox();
 var popupElement
= picker.get_popupContainer();
 var dimensions
= picker.getElementDimensions(popupElement);
 var position
= picker.getElementPosition(textBox);
 picker.showPopup(position.x, position.y
- dimensions.height);
}

THe window is opening up fine, but the IFRAME scrolls upward in the main window when calendar opens up. that probably is for the amount of size it needs below the calendar button. But since I am opening up the window above there is no need to scroll the page. Because of the scroll my menu at the top also scrolls out of the window.

Any solution? Should I set the z-index of IFRAME to something to stop it?




1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 22 Apr 2008, 11:40 AM
Hello Piyush,

Make sure there is enough space above the datepicker to show the calendar control. Also do not forget to return false in the handler where you invoke showing the calendar control:

 <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Culture="Bulgarian (Bulgaria)">
           <DatePopupButton onclick="ShowPopupAbove(); return false;" />
           <DateInput onclick="ShowPopupAbove(); return false;" />
        </telerik:RadDatePicker>

Hope this helps.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Calendar
Asked by
Piyush Bhatt
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or