1 Reply Latest reply on Aug 10, 2011 1:02 AM by Mark Paluch

    Richface 3.3.1, JSF 1.2 Calendar help needed

    Anthony Crane Newbie

      Hi,

       

      I have 4 calendar popups on one page. The first calendar date restrictions are simple ie. the date should not be future date. I did not have an issue implementing that.

       

      the second calendar should not be greater than the value entered in the first calendar and should also not be a future date. When i try to use the attribute 'preloadDateRangeEnd' in the second calendar and i give the value of the first calendar it throws the below error coz the value of the first calendar is null on page load.--

       

      java.lang.NullPointerException

          at java.util.Date.getMillisOf(Date.java:939)

          at java.util.Date.after(Date.java:912)

       

       

      How should i restrict the enabled dates of the second calendar? I tried to implement the calendarDataModel but i dont know how to pass the value of the first calendar in the datamodel.

       

      i am trying to use javascript to check the value of the first calendar using --  $("myForm:myCalendar").component.getCurrentDate();

       

      this does not give me the correct value of the first calendar. It only gives the value as the first date of the month.

       

      Please help me and guide with any one way....

       

      thanks