Skip to product menu
Skip to main content

Date Range

The value for this input datatype will be available in the session object in the following format:

Attribute NameDatatype Description
MetamapDate Range Meta (A)
ValuemapThe details of the date range ex: "from":"2021-04-07","to":"2021-04-19"

Date Range Meta (A)

Attribute NameDatatype Description
TypeString'daterange'
valueString"from":"2021-04-07","to":"2021-04-19"

Sample Code:

Format received in input "session" object:

Copied{
   "meta":{
      "type":"daterange",
      "value":{"from":"2021-04-07","to":"2021-04-19"}
   },
   "value":{
      "from":"2021-04-07",
      "to":"2021-04-19"
   }
}

Format to be returned in response object:

Copiedresponse=map();
response.put('daterange' , {
         "from":"2021-04-07","to":"2021-04-19"
      });
return response;