2

我正在使用 MS bot 框架制作一个机器人,这是我用来从用户那里获取详细信息以进行预约的表单流。

有没有办法显示 datetimepicker 而不是让用户输入日期和时间。然后将用户在选择器中输入的值存储在变量中?

public class ScheduleApp
{
    [Prompt("What is your First Name? {||}")]
    public string FirstName;
    [Prompt("What is your Last Name? {||}")]
    public string LastName;
    [Prompt("What is your email address? {||}")]
    public string Email;
    [Prompt("What is your Contact number? {||}")]
    public string mobilePhone;
    [Prompt("What is your Gender? Male or Female {||}")]
    public string Gender;
    [Prompt("What is your Age? {||}")]
    public string Age;
    [Prompt("What is the date for the appointment? {||}")]
    public DateTime Date1;
    [Prompt("Any comments {||}")]
    public string Comment;

    public static IForm<ScheduleApp> BuildForm()
    {
        return new FormBuilder<ScheduleApp>()
            .Message("I just need a few details to schedule the appointment ")
            .Build();
    }
}
4

0 回答 0