For the managed package runtime, add a Date Input element on a Flexcard to enable users to select a formatted date from a calendar widget. From the Properties panel, configure properties and custom attributes, add an action, and add conditions.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
|
Required Versions |
|---|
|
Available beginning Winter '22. |
- From the Flexcards tab, click a version of a Flexcard to open the Flexcard Designer.
- From the Build panel, click Inputs, and drag the Date element onto the canvas.
- (Optional) From the Properties panel, update the element name in the Element Name field.
-
Configure properties common to all Input elements:
-
(Optional) In Field Binding, bind the value of the input element to an existing or new data field. See Bind a Flexcard Input Value to a Data Field (Managed Package).
-
In Field Label, enter the label that appears next to the element.
-
(Optional) In Placeholder, enter temporary text that displays inside the input field and which suggest to the user what content to enter.
-
(Optional) Check Required if the user must enter or select a value for this input element.
-
(Optional) Check Read-only to disable the ability to modify the input values.
-
(Optional) In Help Text, enter helpful text about the purpose of the input field. This feature adds an info icon (i) next to the element's label, which when hovered over displays the text.
-
- (Optional) Click into Default Value to select a default input value from a merge field. Or, enter a value as plain text. Enter a default value in the format specified in Date Format.
-
(Optional) Update the Date Format. Default is
MM-dd-yyyy, which displays as
12-03-2021. See date-fns format for format options. -
(Optional) To limit the user to a specific date range, set the Minimum
Date and Maximum Date.
Select a date in the past or future in the format specified in Date Format. For example, for December 1, 1990, if the format is
MM-dd-yyyy, enter 12-01-1990, and if the format isdd-MM-yyyy, enter 01-12-1990. Leave Maximum Date empty for the current date. -
(Optional) To configure additional properties available to the element, click
+ Add New in the Custom Attributes
section. For each new attribute, perform the following tasks:
-
Click into the Attribute field to select from an attribute in the dropdown. See DatePicker Lightning Web Component ReadMe (Managed Package) for available attributes.
-
In the Value field, enter a value for the attribute.
-
- To execute an action when a user interacts with the input element, click + Add Action, and see Add a Click Event to a Flexcard Element (Managed Package).
- (Optional) To add conditions that must be met for the element to display, see Add Conditions to a Flexcard Element (Managed Package).
- (Optional) To style your element, click Style to open the Style panel, and see Style Flexcard Elements (Managed Package).