3 Replies Latest reply on Aug 2, 2013 5:03 PM by bleathem

    picking date from rich calender

    arko1983

      Cant pick the date from rich calender. it is showing invalid date and the text alert is showing a huge text ie monday..tuesday etc

       

      function getAge(date) {

       

                                      var now = new Date();

                                      var opnow = jQuery(#{rich:element('openingdate')}).text();

                                      var startDate = new Date($('#openingdate').val());

                                      

                                      var today = new Date(now.getYear(),now.getMonth(),now.getDate());

                                      alert("opnow (text):"+opnow + " **** startDate :"+startDate);

      }

       


      <rich:calendar id="openingdate"







      value=""







      title=""







      styleClass="" datePattern="dd-MM-yyyy"







      />

       

                                                                                                </rich:calendar>