I am working on a FormFlow feature of a bot framework in one of my bot projects. The bot is required to get input from user about the date range (From and To). The form flow works, however the bot requires to enter DateTime in string. To avoid human errors, I would like it to be a Date picker (like the one in Adaptive Cards) instead of string input from user.
I tried setting type of field explicitly but it didn't work for some reason. See the code below.
[Serializable]
public class Leave
{
[Prompt("Select type of leave you want to apply.")]
public LeaveTypeEnum LeaveType;
[Prompt("Vacations from date")]
public DateTime? From;
[Prompt("To date")]
public DateTime? To;
public static IForm<Leave> BuildForm()
{
return new FormBuilder<Leave>().Message
("Fill in the form.")
.Field(new FieldReflector<Leave>(nameof(From)).SetType(typeof(DateTime)))
.Field(nameof(From))
.Field(nameof(To))
.Build();
}
}
Can we show datepicker instead?