Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
day has to be high lighter in web date chooser
posted

Hii,

Using the Infragistics web Date Chooser, I want to hight light the any one day (Ex: All thursdays), ie particular day for color should be different from other days.

Take Example for thursday:  All dates which is fall in thursdays, should be in red color.

 

Can anyone please help me how i can achieve this. This is very urgent requirement . Its very helpful if any one do helps to me.

 

Thanks

Vanji

Parents
  • 24497
    posted

    Hi Manji.

    WebCalendar has ClientSideEvents.renderDay. If application processes that event, then it may modify appearance and content of any day in calendar. Second param (oDay) has various members. You may look at docs for that event or put "debugger;" line in that event and check all its members.

    Below example shows how to modify color of Thursdays. You can use either css or element.style.color.

    <style type="text/css">.redClr{color:red;}</style>
    <script type="text/javascript">
     function WebDateChooser1_CalendarRenderDay(oCalendar, oDay, oEvent)
     {
      if(oDay.dow == 4)
      {
       // you can use oDay.css
       if(oDay.css.indexOf(' redClr') < 0)
        oDay.css += ' redClr';
       // or you can use oDay.element explicitly and modify rendering completely
       //oDay.element.style.color = 'red';
      }
     }
    </script>
    <igsch:WebDateChooser ID="WebDateChooser1" runat="server">
     <ClientSideEvents CalendarRenderDay="WebDateChooser1_CalendarRenderDay" >
     </ClientSideEvents>
    </igsch:WebDateChooser>

Reply Children