Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Web Date Chooser under an update panel
posted

I am using a WebDateChooser control in an update panel which is reside in an UltraWebTab.When the page is loaded for the first time , I selected a date and submit the information and it get saved without any issues.

Then I wanted to change the date again and I clicked on the WebDateChooser control and then the Calender is not get displayed.

What could be the reason for this ?

Additional Info : This functionality is from a custom web part I developed in sharepoint.

Parents
No Data
Reply
  • 24497
    posted

    Hi,

    If that happens only under IE, then the reason can be failed readyState. In order to open drop-down calendar WebDateChooser checks its location and if it is located not directly in <form> or <body>, then it removes html element of calendar from its current parent and appends it to body. Unfortunately if that happens before page is loaded, then IE raises exception. So, to avoid that, WebDateChooser checks if page is loaded. For that purpose the onload event is used and document.readyState=='complete'. If both of those flags failed, then calendar is not dropped. On other hand I already saw few applications with complex architecture, when after async postback the readyState of IE is permantly falls into 'interactive' state and WebDateChooser never opens calendar. Unfortunately internal logic of WebDateChooser is not able to get around that feature of IE.

    Application may disable load-check (and hope that user will not click drop-down while page is loading). To disable that validation application may do following:

    <script type="text/javascript">
    function
    WebDateChooser1_InitializeDateChooser(oDateChooser)
    {
      igdrp_all._loaded =
    true;
    }
    </script>

    <igsch:WebDateChooser ID="WebDateChooser1" runat="server">
     
    <ClientSideEvents InitializeDateChooser="WebDateChooser1_InitializeDateChooser"></ClientSideEvents>
    </igsch:WebDateChooser>

Children