microsoft / microsoft/AdaptiveCards
Setting the value attribute for field with type Input.Date return blank in adaptive card
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
When setting a value for a field of type Input.Date in an adaptive card, the value appears blank if the field is placed somewhere in the middle of the card. However, when the same field is positioned at the top, the output is displayed correctly.
{ "type": "AdaptiveCard", "$schema": "https://adaptivecards.io/schemas/adaptive-card.json", "version": "1.5", "body": [ { "type": "Container", "items": [ { "type": "Input.ChoiceSet", "choices": [ { "title": "Project Level", "value": "2" }, { "title": "Resource Level", "value": "3" }, { "title": "Multi Project Level", "value": "1" } ], "placeholder": "Select Trigger Type", "isRequired": true, "id": "TriggerType", "label": "Please select Trigger Type from below", "errorMessage": "Trigger Type is required" } ] }, { "type": "Input.ChoiceSet", "label": "Please select Template Type from below", "choices": [ { "title": "Standard", "value": "1" }, { "title": "Tailored", "value": "2" } ], "placeholder": "Select Template Type", "id": "TemplateType", "isRequired": true, "errorMessage": "Template Type is required" }, { "type": "Input.Date", "label": "Please select Planned Trigger Date.", "id": "TriggerDate", "placeholder": "Select a Trigger date", "isRequired": true, "errorMessage": "Trigger date is required" },
with placing at first it is working as expected
`{
type: "AdaptiveCard",
'$schema': "https://adaptivecards.io/schemas/adaptive-card.json",
version: "1.5",
body: [
{
type: "TextBlock",
text: "Some fields are auto filled you can change as per your requirement",
wrap: true,
weight: "Bolder"
},
{
type: "Input.Date",
label: "Please select Planned Trigger Date.",
id: "TriggerDate",
placeholder: "Select a Trigger date",
isRequired: true,
errorMessage: "Trigger date is required",
value: Topic.preTriggerDate
},
{
type: "Input.ChoiceSet",
label: "Please select Trigger Time (IST)",
value: Topic.preTriggerTime,
choices: [
{
title: "12:00 AM",
value: "0"
},
{
title: "01:00 AM",
value: "1"
},
{
title: "02:00 AM",
value: "2"
},
{
title: "03:00 AM",
value: "3"
},
{
title: "04:00 AM",
value: "4"
},
{
title: "05:00 AM",
value: "5"
},
{
title: "06:00 AM",
value: "6"
},
{
title: "07:00 AM",
value: "7"
},
{
title: "08:00 AM",
value: "8"
},
{
title: "09:00 AM",
value: "9"
},
{
title: "10:00 AM",
value: "10"
},
{
title: "11:00 AM",
value: "11"
},
{
title: "12:00 PM",
value: "12"
},
{
title: "01:00 PM",
value: "13"
},
{
title: "02:00 PM",
value: "14"
},
{
title: "03:00 PM",
value: "15"
},
{
title: "04:00 PM",
value: "16"
},
{
title: "05:00 PM",
value: "17"
},
{
title: "06:00 PM",
value: "18"
},
{
title: "07:00 PM",
value: "19"
},
{
title: "08:00 PM",
value: "20"
},
{
title: "09:00 PM",
value: "21"
},
{
title: "10:00 PM",
value: "22"
},
{
title: "11:00 PM",
value: "23"
}
],
placeholder: "Select Trigger Time",
isRequired: true,
errorMessage: "Trigger time is required",
id: "TriggerTime"
},
{
type: "Input.ChoiceSet",
value: Topic.preTriggerType,
choices: [
{
title: "Project Level",
value: "2"
},
{
title: "Resource Level",
value: "3"
},
{
title: "Multi Project Level",
value: "1"
}
],
placeholder: "Select Trigger Type",
isRequired: true,
id: "TriggerType",
label: "Please select Trigger Type from below",
errorMessage: "Trigger Type is required"
},
{
type: "Input.ChoiceSet",
label: "Please select Template Type from below",
value: Topic.preTemplateType,
choices: [
{
title: "Standard",
value: "1"
},
{
title: "Tailored",
value: "2"
}
],
placeholder: "Select Template Type",
id: "TemplateType",
isRequired: true,
errorMessage: "Template Type is required"
},
{
type: "Input.ChoiceSet",
label: "Please select Interval in Months",
value: Topic.preInterval,
choices: [
{
title: "1",
value: "1"
},
{
title: "2",
value: "2"
},
{
title: "3",
value: "3"
},
{
title: "4",
value: "4"
},
{
title: "5",
value: "5"
},
{
title: "6",
value: "6"
},
{
title: "7",
value: "7"
},
{
title: "8",
value: "8"
},
{
title: "9",
value: "9"
},
{
title: "10",
value: "10"
},
{
title: "11",
value: "11"
},
{
title: "12",
value: "12"
}
],
placeholder: "Select Interval in Months",
id: "Interval",
isRequired: true,
errorMessage: "Interval in Months is required"
},
{
type: "ActionSet",
actions: [
{
type: "Action.Submit",
title: "Submit",
id: "submitButton"
}
]
}
]
}`
``
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the provided Adaptive Card examples, comparing Input.Date with a value at the top of the card and after the ChoiceSet fields. Trace the rendering path for Input.Date and verify that its value is displayed correctly when the field is placed in the middle of the card.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100