Loading
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Omniscripts Date Element

          Omniscripts Date Element

          Enable users to select a date from a date picker by adding a Date element to your Omniscript. Set the minimum and maximum dates and the date format.

          1. Enter the earliest date the user can select from the date picker, such as 01-01-1950.

            You can pick a fixed date, or you can enter a relative date in the format TODAY +/- N day(s)/week(s)/month(s)/year(s). For example, you can enter TODAY — 1 day or TODAY + 3 months.

            Note
            Note

            The format entered must be the same as specified in the date display format. For example, to set the minimum date to January 1, 1950, if the date format is MM-DD-YYYY, enter 01-01-1950.

            The Minimum Date field doesn't accept merge fields.

          2. Enter the latest date the user can select from the date picker, such as 12-31-2019.

            You can pick a fixed date, or you can enter a relative date in the format TODAY +/- N day(s)/week(s)/month(s)/year(s). For example, you can enter TODAY — 1 day or TODAY + 3 months.

            Note
            Note

            The format entered must be the same as specified in the date display format. For example, to set the minimum date to January 1, 1950, if the date format is MM-DD-YYYY, enter 01-01-1950.

            The Maximum Date field doesn't accept merge fields.

          3. Enter the format to display the date.
            For example, if the format is MM-DD-YYYY, and the user selects January 3, 2020 from the date picker, the date displays as 01-03-2020. For more format options, see Day.js.
          4. In the Advanced Options section, update values for the following properties:
            • Data Type: Specifies how to display the date in the Data JSON.

              If set to String, the specified format is applied. String is the default data type.

              If set to Date, the date is encoded as an ISO 8601 datetime, such as 2018-01-28T05:00:00.000Z, in the GMT/UTC time zone.

              Using this format instead of a String such as YYYY-MM-DD without a time requires a thorough understanding of time zone handling. Midnight of the date is converted from either the org time zone or the user's time zone to GMT/UTC.

            • Format: Specifies how the date is formatted in the Data JSON when Data Type is set to String. For example, YYYY-MM-DD. In the designer for a managed package, specify the format in the Model Date Format field. For more format options, see Day.js.

              The Date element's Model Date Format must match the Omnistudio Data Mapper's date format. Mismatched date formats can result in a blank Date element.

          5. Enter a Default Value. See Set a Default Value for an Omniscript Element.
            Note
            Note

            The format entered must be the same as in the specified in the date display format. field. For example, to set the minimum date to January 1, 1950, if the date display format is MM-DD-YYYY, you must enter 01-01-1950.

            The date picker lets the user choose a date that is +/- 100 years from the default date.

           
          Loading
          Salesforce Help | Article