Download the Code [^] -
Updated 3/2/2002
This is a C# project for VS.Net. In it's simplicity, a DatePicker for a
WebForm is a pop-up Javascript window that uses the calendar control. When the
DatePicker window has focus, if you click on the date it will be transferred to
your main input form. We have also added the ability to select a Year and Month
from a DropDownList to make finding a future or past date more convenient.
Other than the comments in C# file, there is no documentation. A small image
appears to the right of a textbox. Click on the image and a calendar control
will appear in a pop-up window. Click on the date and the calendar will close
and the date will appear in the text box.
Things to look for in the code
- Default.aspx - A href="javascript:DatePicker('yZForm','tbxDate');" -
yZForm is the name of the page form and tbxDate is the name of the textbox.
- Default.aspx - Javascript Window named DatePicker
- yZDatePicker.aspx - CalendarScript - loaded from the .aspx.cs page to
handle the transfer.
The source code is located in a Vs.Net (.Net 1.0) project.
- Default.aspx - calls the DatePicker
- yZDatePicker.aspx - contains the code for the DatePicker.
- imgCalendar.Jpg - the image file used on Default.aspx
A working sample can be found
Here When you
click on the link a new window will open - close the window to return to this
page.
Top 