---
schema_version: "1"
id: 209fbcd07938310af14e357e10adef34393ee4b189c1ac232e1b4b47a3c3c41e
title: Omniscripts Date Element (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omniscripts_date_element.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omniscripts_date_element.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 02c4e7da5d6f65a948e1bef26f892817dacbff34d62d0eccf9b63c3ceeb85fd0
description: For the managed package runtime, 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.
products:
  - Omnistudio
release: "264"
---
# Omniscripts Date Element (Managed Package)

For the managed package runtime, 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.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

1. Drag a **Date** element from the Build panel onto the canvas.
2. In the Properties panel, give the element a name in the **Name** field.
3. In **Field Label**, enter a label visible to the user.
4. In **Minimum Date**, 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    The format entered must be the same as in the **Date Format** field. For example, to set the minimum date to January 1, 1950, if the **Date Format** is MM-DD-YYYY, you must enter 01-01-1950.
    
    The **Minimum Date** field doesn't accept merge fields.
5. In **Maximum Date**, 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    The format entered must be the same as in the **Date Format** field. For example, to set the maximum date to December 31, 2019, if the **Date Format** is MM-DD-YYYY, you must enter 12-31-2019.
    
    The **Maximum Date** field doesn't accept merge fields.
6. In **Date Format**, 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](https://day.js.org/docs/en/parse/string-format).
7. (Optional) 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 **Model Date 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.
            
            ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
            
            Note 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.
    - **Model Date Format**: Specifies how the date is formatted in the Data JSON when **Data Type** is set to **String**. For example, YYYY-MM-DD. For more format options, see [Day.js](https://day.js.org/docs/en/parse/string-format).
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
        
        Note
        
        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.
8. (Optional) Enter a **Default Value**. See [Set a Default Value for an Element (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_set_a_default_value_for_an_element.htm&release=264.0.0&type=5 "For the managed package runtime, the Default Value property sets the JSON value of an element to a static value by default and exists on certain elements. The Default Value is overwritten if the element is prefilled from an Omnistudio Data Mapper or JSON response.").
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    The format entered must be the same as in the **Date Format** field. For example, to set the minimum date to January 1, 1950, if the **Date 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.
9. (Optional) For additional properties, see [Common Omniscript Element Properties Definitions (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_common_omniscript_element_properties_definitions.htm&release=264.0.0&type=5 "For the managed package runtime, each element also includes an extensible Property set that's specific to the type of element. Use the Properties pane on the Designer to edit these properties. Some common element properties aren’t available in certain elements.").

- **[Date Properties (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_date_properties.htm&release=264.0.0&type=5)**  
    For the managed package runtime, Date properties are configurable from the Properties panel when you select a Date element. With the Date element, enable users to select a date from a date picker in your Omniscript.