Represents a Windows control that enables the user to select a date using a visual monthly calendar display.
See Also: MonthCalendar Members
The System.Windows.Forms.MonthCalendar control allows the user to select a date using a visual display. You can limit the date and times that can be selected by setting the MonthCalendar.MinDate and MonthCalendar.MaxDate properties.
You can change the look of the calendar portion of the control by setting the Control.ForeColor, Control.Font, MonthCalendar.TitleBackColor, MonthCalendar.TitleForeColor, MonthCalendar.TrailingForeColor, and Control.BackColor properties.
The System.Windows.Forms.DateTimePicker control only supports Gregorian calendars.
The System.Windows.Forms.DateTimePicker control only supports Gregorian calendars.
The System.Windows.Forms.MonthCalendar control is drawn by the operating system, so the MonthCalendar.Paint event is never raised. If you need to provide a customized look to the System.Windows.Forms.MonthCalendar control, you should override the Control.OnPrint(PaintEventArgs) method, call the base implementation of Control.OnPrint(PaintEventArgs), and then perform custom painting.
If you need custom date formatting and a selection limited to just one date, you might consider using a System.Windows.Forms.DateTimePicker control instead of a System.Windows.Forms.MonthCalendar. Using the System.Windows.Forms.DateTimePicker eliminates much of the need for validating date/time values.
For more information on month calendar controls, see tp://go.microsoft.com/fwlink/?LinkId=178863.