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:
The oo.hidePopup or oo.hideTimePopup will throw the error message. Here is the exact error in the Telerik resource file:
Why does the error happen? please help. Thanks.
Here is my code piece:
| function HideAllCalendars() |
| { |
| if( typeof(jQuery) != 'undefined' ) |
| { |
| jQuery("div.RadCalendar").each(function() { |
| if (this) |
| { |
| // find first INPUT child node |
| var obj = null; |
| for( var 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.