1 Reply Latest reply on Jun 12, 2008 1:39 AM by francis sy

    Problem with <rich:calendar>

    francis sy Newbie

      I'm trying to create a calendar object that submits the form information everytime a new date is selected. I have accomplished this by doing:

      <rich:calendar value="#{sessionScope.Date}" id="Date" inputSize="10" datePattern="dd MMM yyyy" ondateselected="loadByDateBtn(e)" />
      


      With the JScript looking something like this

      function fireLoadCourierSummaryByDateBtn(e) {
      if(document.getElementById('detailsForm:courierSummaryDate').value != ''){
      if(document.getElementById('detailsForm:loadFacilityCode').value != ''){
       fireLink("datePanelGroup", "dateGoBtn");
      }
      else{
       fireLink("goPanelGroup", "goBtn");
      }
      }
      }
      



      The problem occurs when I try to select clean from the calendar. The browser becomes unresponsive and hangs. Any idea as to why this happens? I can tell for certain that it is not the fault of the JScript since I tried placing an alert right after the function declaration and the bowser hangs even before it could display my alert.


      By the way I've read through some of the stuff on the forums and onchanged doesn't work coz I'm using 3.1.4, and I'd like to keep the upgrade option as a last resort.




        • 1. Re: Problem with <rich:calendar>
          francis sy Newbie

          sorry I posted the wrong code for the Javascript. please ignore the one from above.

          
          function loadByDateBtn(e) {
          if(document.getElementById('myForm:Date').value != ''){
          if(document.getElementById('myForm:Code').value != ''){
           fireLink("datePanelGroup", "dateGoBtn");
          }
          else{
           fireLink("goPanelGroup", "goBtn");
          }
          }
          }
          
          



          P.S.
          If you haven't guessed yet, I use hidden buttons to submit my form. :)