Usage and example

To configure the date picker web extension, you must specify these parameters:

  • Theme: Specifies the color theme. Options are "Vibrant" and "Subtle". "Subtle" is the default.
  • Mode: Specifies the color. The values are "Light", "Dark", "High Contrast", and "". The empty string value "" equals the "Light" value.
  • Label: Sets the label of the control. An empty string value "" hides the label, the mandatory indicator, and the information icon with tooltip.
  • Value: Represents the current value of the date picker as numeric representation of a date, for example YYYY-MM-DD for a date picker, and YYYY-MM-DD'T'hh:mm:ss for a date-time picker. When the value changes, a reference to a cell with the Edited cell action is executed.
  • Mandatory: Defines whether or not the selection of an element is required or not. If not provided, the default is "TRUE".
  • Information: Provides a tooltip text for the Information icon. Empty string "" hides the information icon.
  • Hint Text: Defines the hint text as a string, which is shown if no date is selected. Empty string "" shows the date format, which is dependent on the regional settings.
  • Dirty Flag: Indicates if the selected date is changed. Use "TRUE" or empty string "" to use the dirty flag indicator. Use "FALSE" to ignore the flag.
  • Type: Defines whether the default date picker or the date-time picker is used.
  • Date Range: Contains a comma separated list of conditions for start and end date and disabled ranges and dates. If not provided, a date range from 2000-01-01 to 2099-12-31 is available.
  • State: Defines the control state as "Enabled", "Disabled" or "Read-only". If not provided, the default is "Enabled".
  • Error: If an error text is provided as a string, the control is rendered in error state. Use empty string "" to hide the error state.

This example shows how to create a date picker and store the selection in a report variable for further processing.

  1. Create an Application Studio report.
  2. Create a report variable named Selected_Date.
  3. In the Properties - Report pane set the Immediate Writeback option to Automatic.
  4. Insert the Date picker web extension in cells B5:C6.
  5. In the Format Web Extension dialog box specify these values:
    Theme
    Specify ="Vibrant"
    Mode
    Specify ="Light"
    Label
    Specify ="Start Date"
    Value
    Specify =B9
    Mandatory
    Specify ="TRUE"
    Information
    Specify ="Sets the employee start date"
    Hint Text
    Specify =""
    Dirty Flag
    Specify =""
    Type
    Specify ="Date"
    Data Range
    Specify =""
    State
    Specify ="Enabled"
    Error
    Specify =""
  6. Click the B9 cell and add the Getproperty("XML_properties","key","property") function:
    =
    	IF(
    		GETPROPERTY(ReportVariables.Selected_Date.Text,"ID1","value")="",
    		NOW(),
    		GETPROPERTY(ReportVariables.Selected_Date.Text,"ID1","value“))
  7. For the B9 cell define an action with these settings:
    • Actions
      Type
      Specify Set parameters
      Condition
      Specify =TRUE
      Mode
      Specify Edit Cell
    • Parameters
      Name
      Specify Selected_Date
      Property
      Specify Value(.Text)
      Value
      Specify =SETPROPERTY(ReportVariables.Selected_Date.Text,"ID1","value",B9)
  8. Click OK.
  9. Save and view the report in a web browser.