Articles in this section

How to change the background color of the Week number in DateTimePickerAdv?

In WinForms DateTimePickerAdv calendar popup, the week number backcolor can be changed by using the property named “WeekInterior” in DateTimePickerAdv.

 

Note:

The “WeekInterior” property can also be applied for MonthCalendarAdv.

 

The following code example demonstrates the same.

C#

//To show the weak number.
this.dateTimePickerAdv1.Calendar.ShowWeekNumbers = true;
//To change the background color of the week numbers.
this.dateTimePickerAdv1.Calendar.WeekInterior = new Syncfusion.Drawing.BrushInfo(Color.Gray);

 

VB

'To show the weak number.
Me.dateTimePickerAdv1.Calendar.ShowWeekNumbers = True
'To change the background color of the week numbers.
Me.dateTimePickerAdv1.Calendar.WeekInterior = New Syncfusion.Drawing.BrushInfo(Color.Gray)

 

Backcolor is applied in column

Figure 1: Backcolor is applied in Colum header.

Sample Links:

C#: DateTime_WeekInterior_C#

VB: DateTime_WeekInterior_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied