Articles in this section
Category / Section

How to customize the appearance of the WinForms DateTimePicker?

1 min read

Customize the appearance of DateTimePickerAdv

You can customize the appearance of the DateTimePickerAdv in multiple aspects. The following code example demonstrate the same.

C#

//Sets the backcolor of the DateTimePickerAdv.
this.dateTimePickerAdv1.BackColor = colorPickerButton1.SelectedColor;
//Sets the border color of the DateTimePickerAdv.
this.dateTimePickerAdv1.BorderColor = colorPickerButton2.SelectedColor;
// Sets the fore color of the DateTimePickerAdv.
this.dateTimePickerAdv1.ForeColor = colorPickerButton3.SelectedColor;
// Sets the days’ color of the Month calendar popup.
this.dateTimePickerAdv1.Calendar.DaysColor = colorPickerButton4.SelectedColor;
// Sets the day names’ color of the Month calendar popup.
this.dateTimePickerAdv1.Calendar.DayNamesColor = colorPickerButton5.SelectedColor;
// Sets the Inactive month color of the Month calendar popup.
this.dateTimePickerAdv1.Calendar.InactiveMonthColor = colorPickerButton6.SelectedColor;
// Sets the title back color of the Month calendar popup.
this.dateTimePickerAdv1.CalendarTitleBackColor = colorPickerButton7.SelectedColor;
// Sets the title fore color of the Month calendar popup.
this.dateTimePickerAdv1.CalendarTitleForeColor = colorPickerButton8.SelectedColor;
// Sets the fore color of the Month calendar popup.
this.dateTimePickerAdv1.Calendar.ForeColor = colorPickerButton12.SelectedColor;
// Sets the grid color of the Month calendar popup.
this.dateTimePickerAdv1.Calendar.GridBackColor = colorPickerButton11.SelectedColor;

VB

'Sets the backcolor of the DateTimePickerAdv.
Me.dateTimePickerAdv1.BackColor = colorPickerButton1.SelectedColor
'Sets the border color of the DateTimePickerAdv.
Me.dateTimePickerAdv1.BorderColor = colorPickerButton2.SelectedColor
'Sets the fore color of the DateTimePickerAdv.
Me.dateTimePickerAdv1.ForeColor = colorPickerButton3.SelectedColor
'Sets the days color of the Month calendar popup.
Me.dateTimePickerAdv1.Calendar.DaysColor = colorPickerButton4.SelectedColor
'Sets the day names color of the Month calendar popup.
Me.dateTimePickerAdv1.Calendar.DayNamesColor = colorPickerButton5.SelectedColor
'Sets the Inactive month color of the Month calendar popup.
Me.dateTimePickerAdv1.Calendar.InactiveMonthColor = colorPickerButton6.SelectedColor
'Sets the title back color of the Month calendar popup.
Me.dateTimePickerAdv1.CalendarTitleBackColor = colorPickerButton7.SelectedColor
'Sets the title fore color of the Month calendar popup.
Me.dateTimePickerAdv1.CalendarTitleForeColor = colorPickerButton8.SelectedColor
'Sets the fore color of the Month calendar popup.
Me.dateTimePickerAdv1.Calendar.ForeColor = colorPickerButton12.SelectedColor
'Sets the grid color of the Month calendar popup.
Me.dateTimePickerAdv1.Calendar.GridBackColor = colorPickerButton11.SelectedColor

 

Customize the appearance of DateTimePickerAdv

Figure 1: DateTimePickerAdv appearance

Samples:

C#: https://www.syncfusion.com/downloads/support/directtrac/136015/DateTimePickerAdv_Customization-587652829.zip


Conclusion

I hope you enjoyed learning about how to customize the appearance of the WinForms DateTimePicker.

You can refer to our WinForms DateTimePicker feature tour
page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms DateTimePicker example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial
to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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