microsoft / microsoft/AdaptiveCards

Not Able to Fetch Dynamic Date as Selected by User through the DatePicker

Open
#8,642 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Hi,

I am doing a POC for project developed with RASA , and Teams is the Channel. I am bot framework to display adaptive cards, and taking user inputs.

I am trying to integrate a datepicker , and want to record the date input value , selected by the user through the calendar, but I am unable to do it.

I am not able to access the date in the backend of RASA actions, or through tracker data.

Please explain or solve this issue, thanks.

Adaptive Card Code Below.

`adaptive_card_json = {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"body": [
{
"type": "Input.Date",
"id": "requested_departure_date",
"title": "Select a date:",
"value": "2023-08-01",
"min": "2023-01-01",
"max": "2023-12-31"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"text" : "August 23, 2023",
"channel": "botframework",
"id" :"requested_departure_date",
"data": {
"msteams":{
"text":"${requested_departure_date}",
"title":"Select",
"type":"messageBack",
"value" : "/modify_departure_date"
},
"style": "positive"
}
}
]
}

        message = {
            "type": "message",
            "text": "Here is the calendar:",
            "attachments": [
                {
                    "contentType": "application/vnd.microsoft.card.adaptive",
                    "content": adaptive_card_json
                }
            ]
        }

        dispatcher.utter_message(json_message=message)`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Adaptive Card payload, especially the Input.Date and Action.Submit data, and reproduce the submission through Microsoft Teams into the RASA action and tracker. Trace where the selected value is received; done means the user's chosen date is available in the backend or tracker data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.