Example ASP.NET control (embedded):
Entering a Date Directly
You can enter a date directly in the DateInputBox by performing one of the following:
- Entering the date from your keyboard
- Entering arithmetic, such as +2d to add two days to the existing date
- Clicking the part of the date you want to change in the DateInputBox and using your
up and down arrow keys to increment and decrement the values
Note: You can use your left and right arrow keys to move between
different parts of the date in the DateInputBox.
Entering a Date Using the Calendar
Click the Calendar icon to view the calendar. You can interact with the calendar
by:
- Clicking on a day to set the date
- Clicking Today to set the current date
- clicking the left and right arrows to navigate through months and years
The DateInputBox control is initialized with the following code:
<NhsCui:DateInputBox ID="DateInputBox1" runat="server" WatermarkCssClass="DateInputWatermark"
NullStrings="Null,Nothing,Unknown" Functionality="Complex"/>
- AllowApproximate – specifies whether to display a checkbox
for the approximate flag
- DateType – specifies the DateType
- DateValue – specifies the DateValue
- DisplayDateAsText – specifies whether the date should be
displayed as Today, Tomorrow or Yesterday
- DisplayDayOfWeek – specifies whether the day of the week
should be displayed
- Functionality – specifies the functionality exposed by the
DateInputBox
- Month – specifies the month
- NullStrings – lists localized strings that identify different
types of null index dates
- Value – the entered date
- WatermarkCssClass – gets or sets the CSS class used for the
WatermarkText property
- WatermarkText – gets or sets the watermark text
- Year – specifies the year
- DisplayDateAsText has a default value of “False”
- DisplayDayOfWeek has a default value of “False”
- Functionality has a default value of “Simple”
- NullStrings defaults to an empty list
- WatermarkCssClass defaults to an empty string
- WatermarkText defaults to “dd-MMM-yyyy”
The entry modes for the DateInputBox are:
- Using the left and right arrow keys on your keyboard
- Entering freeform text
- Using arithmetic where y, m, w and d represent years, months, weeks and days respectively;
a positive or negative operand may be used
- Using the dropdown calendar as illustrated above
- Using the space bar to cycle through null types, if they exist