We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: 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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile