Applies to

DatePicker and EditMask controls


The CalendarBackColor property defines the color to be used for the background of the calendar that displays when you click on the down arrow in a DatePicker control or an EditMask control with the DropDownCalendar property set to true. When you are defining the background color in a painter, some of the choices take their values from the current Windows color scheme or from custom colors. To add your own colors to the color drop-down list, select Design>Custom Colors before displaying the Properties view.


This property does not work on the Windows 8.1/10 operating system.

In a painter

To set the background color for the calendar in a DatePicker or EditMask control:

  • Select a color from the BackColor drop-down list on the Calendar page in the control's Properties view.

In scripts

The CalendarBackColor property takes a long (-2 to 16,777,215) that specifies the numerical value of the background color . The CalendarBackColor value is a combination of values for the red, green, and blue components of the color.

If you do not know the long value for the color, choose Design>Custom Colors to determine the red, green, and blue values and then call the RGB function to specify the color in a script.

The following example sets yellow as the background color for the calendar in a DatePicker control:

dp_1.CalendarBackColor = RGB(255, 255, 0)