One rather common requirement for web applications is date and time entry. Microsoft supplies a calendar control in the ASP.Net framework. Realistically, the uses of the control are limited, especially compared to the powerful outlook style date/time pickers in desktop applications. Peter Blum of www.peterblum.com has created what could easily be deemed the end-all solution to web based date/time entry – Peter’s Date Package. His package includes a spiffy dropdown calendar/textbox, a great looking calendar, a collection of date/time centric validators, and more.
One of the major pieces in Peter’s package is what he calls the DateTextBox. No doubt, this control is exactly what the name describes – a textbox for entering dates. This particular textbox is no run-of-the-mill textbox, though. It comes equipped with a feature loaded popup calendar. Aside from great looks out of the box, the calendar comes with a customizable context menu, and a host of other features.
Immediately upon targeting a DateTextBox in the Visual Studio properties window, hundreds of additional properties come up. The DateTextBox allows for all sorts of scenarios out of the box. One example is when a pair of DateTextBoxes are teamed together in order to allow a range of dates to be entered. The end date DateTextBox can be configured to not allow dates before the starting DateTextBox’s value. To make things even better, the package comes with a neat dropdown menu which will automatically input a customizable date range. For example, the developer can configure a range of five days, a whole month, year, or any other range. An example of this control in action: