My question is regarding the submit button in adaptive cards. I'm implementing an adaptive card for the date of birth in of the records. Till now, I have implemented a date picker where the default value of the date picker will be the user's DOB present in the records. I need to disable to the "Update" button until/unless the user changes the default value. Is it possible to implement the date picker in this manner? I'm attaching the screen shot of the date picker that I've implemented till now. Thanks in advance.
public static Attachment DatePickerAttachment(string givenDob, string maxDate, string minDate)
{
var card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 2));
card.Body.Add(new AdaptiveTextBlock()
{
Text = $"Please enter the date",
Wrap = true,
Size = AdaptiveTextSize.Default,
Spacing = AdaptiveSpacing.Medium
});
var inputDate = new AdaptiveDateInput()
{
Id = "date",
Placeholder = "Please enter the date",
Value = $"{givenDob}",
Max = $"{maxDate}",
Min = $"{minDate}"
};
card.Body.Add(inputDate);
var dataObj = new SimpleObjClass()
{
value = "go on with the process"
};
var action = new AdaptiveSubmitAction()
{
Title = "Update",
Data = dataObj,
};
card.Actions.Add(action);
var dataObj2 = new SimpleObjClass() { value = "kill the process" };
var action1 = new AdaptiveSubmitAction()
{
Title = "Cancel",
Data = dataObj2,
};
card.Actions.Add(action1);
var attachment = new Attachment
{
ContentType = AdaptiveCard.ContentType,
Content = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(card)),
};
return attachment;
}
