Datepicker - Date Selection Dropdown Version 1.01
Control: Datepicker
Release: 1.01 - 12/01/2003
Author: Michael McLain
Whats new since 1.00 - The datepicker control now supports viewstate. If you upgrade from
the 1.00
version of the control and do not wish to use viewstate then
you must manually set the EnableViewstate property to false. The Datepicker dll file is now compiled
under the 1.1 framework.
Datepicker is a custom control that provides date
selection using drop down select objects.
Returning valid dates from a client's browser has always been a problem. Was a valid date entered, is the client's date format MM/DD/YYYY or DD/MM/YYYY. The solution used here is to create three seperate dropdown objects for month, day and year. The returned date is provide in both string and datetime types as well as the selected day, month and year as integer type. The date string format returned to the server is selectable.
Please report any problems using the discussion forum on www.truegeeks.com so we may correct them.
Disclaimer: Use at you own risk. The author will not assume responsibility for any damage that may result from the use of this software.
To make the control
available.
Open a web project from VS.NET.
Open a web form page in the IDE and display the toolbox.
Select the tab on the toolbox that you wish to hold the
control.
Right click the mouse button on the
selected toolbox tab pane.
Select the "Customize
Toolbox" option.
From the Customize Toolbox window
select the ".NET Framework Components" tab. Select the "Browse" button and
navigate to where you saved the "mm_date.dll" file.
Select the "mm_date.dll" file from the navigation
panel and then press "OK".
The datepicker should
now show on the toolbox.
Properties:
Initial_Date: | Default date selection | |
YearRange_Start: | Minimum year range in year drop down, values prior to 1970 not allowed | |
YearRange_End: | Maximum year range in year drop down | |
Date_Mode: | Determines date format returned in the hidden
object's value. date_mode = 1 - MM/DD/YYYY date_mode = 2 - DD/MM/YYYY date_mode = 3 - YYYYMMDD date_mode = 4 - universal format | |
Form_Level: | Form object level index for use with multiple forms per page. (default = 0) |
Returns:
Selected_Date: | Selected date (string), format determined by date_mode | |
Date_Picked: | Selected date in DateTime format | |
Day: | Selected day (integer) | |
Month: | Selected month (integer) | |
Year: | Selected year (integer) |