Skip to content

Setting the value attribute for field with type Input.Date return blank in adaptive card #9295

@AnushkaDalv

Description

@AnushkaDalv

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"
    }
  ]
}

]
}`
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions