System.Windows.Forms.MonthCalendar.SetDate Method

Sets a date as the currently selected date.

Syntax

public void SetDate (DateTime date)

Parameters

date
The date to be selected.

Remarks

This method sets the MonthCalendar.SelectionStart and the MonthCalendar.SelectionEnd properties to the specified date. This method is the functional equivalent of setting the selection range to a single day through the MonthCalendar.SetSelectionRange(DateTime, DateTime) method or the MonthCalendar.SelectionRange property.

Requirements

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