2 Replies Latest reply on Aug 13, 2012 10:21 AM by Thang Pham

    Control style for past date for rich:calendar yield different look in FF vs Chrome. BUG?

    Thang Pham Newbie

      I have a requirements that the client cannot select past date on the calendar. So I try something like this


      This is my javascript


      function disablePastDate(day){
          var curDate = new Date();
          if(day.date.getTime() - curDate.getTime() > 0) return true;
          else return false;    
      function disablePastDateStyle(day){    
          var curDate = new Date();
          var style = '';
          if(day.date.getTime() - curDate.getTime() < 0) style = 'pastDate';
          return style;


      This is my css



          background-color: gray;



      and my calendar look as follow



      <rich:calendar dayDisableFunction="disablePastDate"
                     id="calendarOnce" />


      1. So the behavior, I got is that I cannot select the past date. This is great, but the style of the past date appear correctly in firefox but not in chrome. In Firefox you can see the backgound is gray on the past date, but not in chrome? Is this a bug?


      2. From the screen shot in FF, you can see that the first 3 dates 29, 30, 31 is not backgound-color: gray. Is this a bug?


      3. What is the left most column of number in rich:calendar represent? and how can I not show it?


      FF 14, and Chrome 21.0.1180.75