Xceed Grid for WinForms v4.3 Documentation
WinDatePicker_DropDownControl
Welcome to Xceed Grid for WinForms v4.3 > Basic Concepts > Editor Controls > WinDatePicker control > WinDatePicker_DropDownControl

The WinDatePicker control uses a WinCalendar control as its dropdown control. This WinCalendar control can be accessed via the DropDownControl property. Unlike the other editors/controls (with the exception of the WinComboBox and WinNumericTextBox controls), the datepicker's dropdown cannot be replaced with another control.

Dropdown control

The first month that is displayed in the dropdown is determined by the value of the FirstMonth property (by default, the current month). For example, if the current date is 25/11/2004, the first month displayed will be November 2004. Whenever a new date is selected in the dropdown, or the Value property changed, the first month displayed will be the month of the new date. If the FirstMonth property is explicitly set, the first month displayed in the dropdown will always be the month of the date assigned to the FirstMonth property. 

In the image below, the first month displayed in the dropdown of the datepicker on the left is the current month (default behavior). For the datepicker on the right, the FirstMonth property has been set to January 2004 (new DateTime( 2004, 01, 01 ) ); therefore, January 2004 is the first month displayed in the dropdown.  

In the next image, a new date (February 28, 2005) is selected in the datepicker on the left, which results in February 2004 becoming the new first month in the dropdown. In the second datepicker, since the FirstMonth property was set to January 2004, even if a new date is selected, the first month will remain January 2004.  

The maximum and minimum number of months that are displayed in the datepicker's dropdown are determined by the MinValue (by default, DateTime.MinValue) and MaxValue (by default, DateTime.MaxValue) properties. Navigation within the dropdown, regardless of the number of months that is displayed, is limited between the minimum and the maximum months. The number of months that are displayed will never exceed the viewing area of the screen when resizing the dropdown.