Version

RenderDay Property (CalendarClientSideEvents)

Event fired before the day is rendered. This event can be used to customize day painting.
Syntax
'Declaration
 
Public Property RenderDay As String
public string RenderDay {get; set;}
Remarks

It can be the name of implemented function or explicit javascript statement(s). If the name of function is used, then that event handler may contain 3 parameters.

1st parameter: reference to the WebCalendar object.

2nd parameter: reference to the painted day. That parameter contains following member variables:

  • year - number: painted year.
  • month - number: painted month.
  • day - number: painted day of the month.
  • selected - boolean: true if painted day was selected.
  • dow - number: day of the week (0..6) of the painted day.
  • index - number: index of painted day within calendar <table>.
  • text - string: text to paint in the day, usually the day (this value can be modified.)
  • css - string: name of CSS class used for painting (this value can be modified by appending a custom CSS class separated by a space.)
  • element - object: reference to the <td> HTML element containing this painted day.
Following example will replace text in the first days of all months by the "1st" string:

if(oDay.day == 1) oDay.text = oDay.text + 'st';

Following example will paint all Saturdays by italic font:

if(oDay.dow == 6) oDay.element.style.fontStyle = 'italic';

Following example will paint January 1st of any year by red background:

oDay.element.bgColor = (oDay.day == 1 && oDay.month == 1) ? 'red' : '';

3rd parameter: reference to the ig_EventObject.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also