Home

Windows Control:
The Date Picker Control

 

Introduction to the Date Picker Control

The Date and Time Picker is a control that allows the user to select either a date or a time value. This control provides two objects in one:

Date/Time Picker

 
Date/Time Picker Date/Time Picker

One of the advantages of the Date and Time Picker control is that it allows the user to select a time or a date value instead of typing it. This tremendously reduces the likelihood of mistakes.

Creating a Date/Time Picker

To create a Date or Time Picker control, add a DateTimePicker control DateTimePicker to a form or other container. The DateTimePicker control is based on the DateTimePicker class. In reality, the DateTimePicker control can be considered as two controls in one: you just have to choose which one of both controls you want to use.

Introduction to the Date Picker

After adding the DateTimePicker control to the form, to allow the user to set the dates and not the times on the control, set its Format property either to Long or to Short.

 

Home Copyright © 2007-2012 FunctionX Next