5 Replies Latest reply on Jun 3, 2016 1:50 AM by Asim Shaikh

    How to highlight dates oncaledar onload instead of onclick

    Asim Shaikh Novice

      Hello Guys

      I have a calendar which is working fine. it displays records on click and changes the colour to green or red. if records are available date will become red colored.

      I don't want onclick I want it displays colours on calendars onload event. following is my code . I think problem with css,,, I guess

       

      .postive-records .rf-cal-sel {

      background-color: green;

      }

       

      .no-records .rf-cal-sel {

      background-color: red;

      }

       

      <rich:calendar styleClass="#{eventMaster.eventMasterList!=null and eventMaster.eventMasterList.size()>0?'postive-records':'no-records'}" locale="EN"

      id="searchDateCalendarcommon" popup="false"

      showApplyButton="false" datePattern="dd/MM/yyyy"

      value="#{eventMaster.eventSearchDate}" >

      <rich:tooltip followMouse="false"

      showDelay="100"

      direction="topRight"

      layout="block"

      onmouseover="">

      <h:inutputText value="#{eventMaster.calendarTooltipText}" style="color: red;font-size: 12px;"/>

       

      </rich:tooltip>

      <f:ajax event="change" listener="#{commonOutputContentBean.showEvents()}" render="cmnoplayoutfrm searchDateCalendarcommon" />

       

      </rich:calendar