System.Windows.Forms.MonthCalendar.SelectionStart Property

Gets or sets the start date of the selected range of dates.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public DateTime SelectionStart { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If you set the value of the MonthCalendar.SelectionStart property to a date that is later than the current value of the MonthCalendar.SelectionEnd property, MonthCalendar.SelectionEnd is automatically set equal to MonthCalendar.SelectionStart.

If you set a date in MonthCalendar.SelectionStart that causes the selection to exceed the number of days specified by the MonthCalendar.MaxSelectionCount property, the value of MonthCalendar.SelectionEnd is adjusted; MonthCalendar.SelectionEnd is automatically set so that the number of days selected is equal to MonthCalendar.MaxSelectionCount.

Note:

MonthCalendar.MaxSelectionCount represents the number of days in the selection, not the difference between MonthCalendar.SelectionStart and MonthCalendar.SelectionEnd. For example, if MonthCalendar.MaxSelectionCount is 7 (the default), then MonthCalendar.SelectionStart and MonthCalendar.SelectionEnd can be no more than six days apart.

Note:

Setting the MonthCalendar.SelectionRange for a System.Windows.Forms.MonthCalendar control that has visual styles enabled will result in the selection range not painting correctly on the control.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0