WebMonthCalendar1.EnableWeekNumbers = true
In some countries, week numbers are used; WebMonthCalendar™ provides you with an option to show week numbers to your end-user. This can be achieved by simply setting the control’s EnableWeekNumbers property to True. By default, this property is set to False.
You can set the EnableWeekNumbers property either by using the Microsoft® Visual Studio® Property Window or by using the following code:
In Visual Basic:
WebMonthCalendar1.EnableWeekNumbers = true
In C#:
WebMonthCalendar1.EnableWeekNumbers = true;
You can also set your own label to be displayed in the column header of the week numbers by setting the control’s WeekNumberLabel property.
In Visual Basic:
WebMonthCalendar1.WeekNumberLabel = "Wk"
In C#:
WebMonthCalendar1.WeekNumberLabel = "Wk";
WebMonthCalendar allows you to set different rules for determining the first week of the year. You can set these rules by setting the control’s WeekRule property to one of the following options:
FirstDay — The first week starts with the first week of the year that has one to seven days.
FirstFullWeek — The first week starts with the first week of the year that has seven full days.
FirstFourDayWeek — The first week starts with the first week of the year that has four to seven full days.
In Visual Basic:
WebMonthCalendar1.WeekRule = System.Globalization.CalendarWeekRule.FirstFullWeek
In C#:
WebMonthCalendar1.WeekRule = System.Globalization.CalendarWeekRule.FirstFullWeek;