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

RadDatePicker popup moves when scrolling

9 Answers 394 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jan Montano
Top achievements
Rank 1
Jan Montano asked on 20 Feb 2009, 07:06 AM
TItle should be: RadDatePicker popup doesn't move when scrolling.


I have a RadDatePicker in a page that has a vertical scrollbar.

When I click on the RadDatePicker, a popup will display. However, when scrolling the page while the popup is displayed, the popup stays in the center of the page.

Let's say if the popup is at coordinate (20,20) of the current screen, it stay's on that coordinate when scrolling. That should not be the case. It should also move. It's like it's floating.

Is there some attributes I could set to fix this issue? Please advise.

Thank you very much.

9 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Feb 2009, 01:36 PM
Hi Jan,

Unfortunately this functionality is not supported. We recommend that you hide the datepicker popup when a scroll is initiated:

http://www.telerik.com/community/forums/aspnet/calendar/datepicker-pop-up-remains-stationary-on-scroll.aspx

Here is one more related forum thread:

http://www.telerik.com/community/forums/aspnet/calendar/popup-calendar-does-not-close-when-clicking-on-scrollbars.aspx

Sincerely yours,
Dimo
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.
0
Jan
Top achievements
Rank 2
answered on 27 Feb 2009, 09:00 AM
Why am I not able to run the javascript successfully? Am I missing something?

function HideOnScroll() 
    var datepicker = <%= RadDatePicker1.ClientID %>
    alert(datepicker.IsPopupVisible())


datepicker.IsPopupVisible() displays an invalid method error.
this goes the same way with all javascripts in the example pertaining to rad controls.

Do I need to set a configuration first?

Thank you very much.



0
Princy
Top achievements
Rank 2
answered on 27 Feb 2009, 11:04 AM
Hi Jan,

I am not sure about the version of RadControls that you are using. Can you try the following client side code and see whether it is working. Otherwise, could you provide the version of RadControls that you are using?

JavaScript:
<script type="text/javascript">   
function HideOnScroll()   
{  
    var datepicker = $find("<%= RadDateTimePicker1.ClientID %>");   
    if (datepicker.isPopupVisible())   
    {  
        datepicker.togglePopup();   
    }   
}   
</script> 

Thanks,
Princy.
0
Jan
Top achievements
Rank 2
answered on 01 Mar 2009, 07:48 AM
I've tried that script before but with same results.

Whether or not I include that if condition, I receive same results for the page.

And when I tried to Alert datepicker.isPopupVisible() -> invalid method.

though var datepicker receives a valid handle.

I've tried both Q3 and Q2 2008 versions but with no luck.

By the way, I'm using Visual Studio Team Suite 2008.
0
Sebastian
Telerik team
answered on 02 Mar 2009, 10:02 AM
Hi Jan,

Can you please verify that you are referencing the client object of the date picker using the $find javascript method? If the issue persists, please post your code in this forum thread and we will gladly assist you in resolving the issue you are facing.

Best 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.
0
Jan
Top achievements
Rank 2
answered on 03 Mar 2009, 12:05 AM
Hmmm... strange

function OnClientLoaded(sender, eventArgs)
{
            var datepicker = $find("<%= ctrlToDate.ClientID %>");
            alert(datepicker);
            alert(datepicker.isPopupVisible());

            var combo = $find("<%= RadComboBox1.ClientID %>");
            alert(combo.get_DropDownVisible());
}



<telerik:RadSplitter ID="RadSplitter1" runat="server" OnClientLoaded="OnClientLoaded">

1. datepicker returns a valid handle.
2. datepicker.isPopupVisible() returns a valid handle now.
3. combo returns a valid handle.
4. however combo.get_DropDownVisible() does not return a valid handle.

0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2009, 06:10 AM
Hello Jan,

Try  combo.get_dropDownVisible() instead of combo.get_DropDownVisible(). I hope the link to online documantation which explains about most important methods of the client-side RadComboBox object.
RadComboBox object

Thanks,
Shinu.
0
Jan
Top achievements
Rank 2
answered on 03 Mar 2009, 09:40 PM
Thanks shinu!

I'll try that.

It's just unfortunate that I keep seeing different examples using get_dropDownVisible() and sometimes using get_DropDownVisible().

Will keep you posted. Thank you very much.


0
Jan
Top achievements
Rank 2
answered on 04 Mar 2009, 06:39 AM
Thanks to Princy and Shinu! It's working now! It was just a matter of wrong casing for the method name.

I first followed the link suggestion of Dimo from telerik containing:

datepicker.TogglePopup();

When it should have been:

datepicker.togglePopup()

Thank you very much guys!
Tags
Calendar
Asked by
Jan Montano
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jan
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Sebastian
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or