RadDateTimePicker Error: 'get_calendar()' is null or not an object

2 posts, 0 answers
  1. Martin
    Martin avatar
    27 posts
    Member since:
    Jun 2009

    Posted 24 Oct 2009 Link to this post

    I ran into problem that RadDateTimePicker client object method "hidePopup" or "hideTimePopup" threw an error message: "'get_calendar()' is null or not an object".

    Here is my code piece:
    function HideAllCalendars() 
        iftypeof(jQuery) != 'undefined' ) 
        { 
            jQuery("div.RadCalendar").each(function() { 
            if (this
            { 
                // find first INPUT child node 
                var obj = null
                forvar i = 0; i < this.childNodes.length; i++ ) 
                { 
                    var node = this.childNodes[ i ]; 
                    if( node.tagName == 'INPUT' && node.id ) 
                    { 
                        obj = node; 
                        break
                    } 
                } 
                if( obj ) 
                { 
                    var oo = $find(obj.id) 
                    if(oo && oo.hidePopup && oo.hideTimePopup) 
                    { 
                        oo.hidePopup(); 
                        oo.hideTimePopup(); 
                    } 
                } 
            } 
            }); 
        } 

    The oo.hidePopup or oo.hideTimePopup will throw the error message. Here is the exact error in the Telerik resource file:
    for(var _32 in Telerik.Web.UI.RadDatePicker.PopupInstances){ 
    if(Telerik.Web.UI.RadDatePicker.PopupInstances.hasOwnProperty(_32)){ 
    var _33=Telerik.Web.UI.RadDatePicker.PopupInstances[_32].Opener; 
    this._hideFastNavigationPopup(_33); 
    Telerik.Web.UI.RadDatePicker.PopupInstances[_32].Hide(); 
    },_hideFastNavigationPopup:function(_34){ 
    if(_34){ 
    var _35=_34.get_calendar()._getFastNavigation().Popup; //Error Happens here! 
    if(_35&&_35.IsVisible()){ 
    _35.Hide(true); 
    },_setInputDate:function(_36){ 
    this._dateInput.set_selectedDate(_36); 
    },_getJavaScriptDate:function(_37){ 
    var _38=new Date(); 
    _38.setFullYear(_37[0],_37[1]-1,_37[2]); 
     

    Why does the error happen? please help. Thanks.
  2. O'Man
    O'Man avatar
    34 posts
    Member since:
    Oct 2009

    Posted 28 Oct 2009 Link to this post

    Hi Martin,

    Can you please provide more details how to cause the error. On my machine iftypeof(jQuery) != 'undefined' )  is always 'undefined'. Maybe you can share a runnable code snippet for me to try.

    Thanks
    Oman


Back to Top