Version

Set the Style of the Active Day

Sometimes you may want the ActiveDayUtc to stand out from the rest of the visible days on a WebCalendarView™ and WebMonthView™. The property that controls the styling of the active day is called the ActiveDayStyle .

The ActiveDayStyle object uses the same Style class that is defined for most Ultimate UI for ASP.NET controls.

The code below changes the three views' ActiveDayStyle BackColor to Red, and sets the ActiveDayUtc to October 11, 2005.

WebSchedule How to Set the ActiveDayStyle 01.png
WebSchedule How to Set the ActiveDayStyle 02.png

In Visual Basic:

Imports Infragistics.WebUI.Shared
...
Private Sub Page_Load(ByVal sender As System.Object, ByVal _
  e As System.EventArgs) Handles MyBase.Load
        Me.WebCalendarView1.ActiveDayStyle.BackColor = Color.Red
        Me.WebMonthView1.ActiveDayStyle.BackColor = Color.Red
        Me.WebScheduleInfo1.ActiveDay = _
          Me.WebScheduleInfo1.ConvertTimeZoneTimeToUtc(New SmartDate(2005, 10, 10))
End Sub

In C#:

using Infragistics.WebUI.Shared;
...
private void Page_Load(object sender, System.EventArgs e)
{
        this.WebCalendarView1.ActiveDayStyle.BackColor = Color.Red;
        this.WebMonthView1.ActiveDayStyle.BackColor = Color.Red;
        this.WebScheduleInfo1.ActiveDay =
          this.WebScheduleInfo1.ConvertTimeZoneTimeToUtc(new SmartDate(2005, 10, 10));
}