- Name Date
- CSS Class CC_Date
- Types DateTime value, string Text (in format "yyyy-MM-dd")
The Date control provides Day, Month and Year inputs grouped together along
with built in valitation (including leap year checking, for example). If
Javascript is available it can also be validated client side and will provide
a date picker popup.
Roadmap
- HTML 5 - Map to HTML5 date input including UTC postback formatting
- Provide MinDate and MaxDate DateTime properties to compliment the string based ones
| Qualifiers |
Type |
Name |
Default |
Description |
|
string |
id |
"" |
Unique identifier within the page for the control |
|
bool |
Enabled |
true |
Wether or not the control is enabled within the page, directly mapped onto the HTML disabled property. |
|
bool |
Visible |
true |
Wether or not the control is rendered into the page's HTML. |
|
string |
Text |
|
The value in the format "yyyy-MM-dd". |
|
DateTime |
Value |
DateTime.Now |
The date that is currently selected |
|
string |
Min |
"" (DateTime.MinValue) |
Provided to allow setting a minimum date from the ASPX directly. Allows a literal date in the format "yyyy-MM-dd" or a type and an offset e.g. "-3d","+8m","2y" for 3 days ago, 8 months ahead and 2 years ahead, respectively. |
|
string |
Max |
"" (DateTime.MaxValue) |
Provided to allow setting a maximum date from the ASPX directly. Allows a literal date in the format "yyyy-MM-dd" or a type and an offset e.g. "-3d","+8m","2y" for 3 days ago, 8 months ahead and 2 years ahead, respectively. |
This example shows a Date control where the user is restricted to picking a date in the previous twelve months only
ASPX
This live demo illustrates the effect of the code as shown in the Example
tab but may be altered slightly to fit in with this site's own operating
environment.