System.Windows.Forms.MonthCalendar.SelectionEnd Property

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

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

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

If you set a date in MonthCalendar.SelectionEnd that causes the selection to exceed the number of days specified by the MonthCalendar.MaxSelectionCount property, the value of MonthCalendar.SelectionStart is adjusted; MonthCalendar.SelectionStart 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