Calendar Controls

VB.NET supports two types of calendar controls: the MonthCalendar and the DateTimePicker. Each allows the user to select a date or time from a graphical control. They should be used instead of textboxes whenever possible because they reduce the chance of data entry errors for dates (such as entering February 31).

DateTimePicker

The DateTimePicker control allows the user to select a date and/or time from a graphical control. The format of the date/time displayed can be controlled using the Format property. The properties MinDate and MaxDate can be used to specify a limit for the dates shown. The Value property contains the selected date/time. Additional properties control the appearance of the control.

In the directory for this ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.