Date Control
Use
The Date Control displays a calendar for end users to select a fixed date. Time in hours and minutes can be shown if defined.
Related to Attribute Types
The Date control only applies to Date-time attributes.
Properties
Each control has properties that allow customization of its behavior in the Work Portal. Below are the properties exclusive to the Date control:
Format Tab
PROPERTY | DESCRIPTION |
---|---|
Date Format | Defines the display format of the date: |
• Short date: Days, months, and year in numbers (e.g., 01/12/2012). | |
• Long date: Days, months, and year in text (e.g., Thursday, December 1, 2012). | |
Show Time | Defines whether the time is displayed alongside the date. |
Date Format Example
By default, Date Controls are displayed in short format. You can change this configuration in the Date Format property.
Note: Different predefined configurations for date and time formats are available, both in long and short formats.
Show Time Example
When Show Time is enabled, time in hours and minutes will appear next to the date in the Date control.
Important:
When a user selects a date but does not specify the time, the date will be displayed without time.
Advanced Tab
PROPERTY | DESCRIPTION |
---|---|
Default Value | Sets a value automatically when the form is opened for the first time. |
If the associated attribute is valued through an expression, the default value is ignored. | |
Minimum Value | Defines the earliest date allowed to be entered. |
Maximum Value | Defines the latest date allowed to be entered. |
Note:
Clicking the Set to default value icon will reset the properties to their default configuration.
Example
A Date-Time control is needed to display the Opening date and time of a claim in a Claims and Complaints Management Process. This date is set automatically when the claim is created and is fixed.
Steps:
-
Drag and drop the date attribute from the data model. It will automatically be interpreted as a Date control in the form.
-
Enable the Show Time property in the Format tab to display the time alongside the date.
-
To set the default date (the date when the claim is created), go to the Advanced tab and define an expression in the Default value property.
-
Use the DateTime.Now expression in the expression module to set the default value of the control to the current date and time when the form is first opened.
-
As the claim opening date cannot be modified, go to the Basic tab and set the Editable property to No.
-
Access the Work Portal to test the Date control.