Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/300.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryUIDatePicker MVC4不';t工作C#_C#_Jquery_Asp.net Mvc_Datepicker_Models - Fatal编程技术网

jQueryUIDatePicker MVC4不';t工作C#

jQueryUIDatePicker MVC4不';t工作C#,c#,jquery,asp.net-mvc,datepicker,models,C#,Jquery,Asp.net Mvc,Datepicker,Models,我想在我的ASP.NET网页中包括两个日期选择窗口。我已经做了手册上的所有事情,但都不起作用。请帮忙 这是我的代码: @model RebeccaAndLudwig.Models.Rsvp <head> <title>"Please Answer to our invite"</title> </head> <section id="contacts" > <div class="inner">

我想在我的ASP.NET网页中包括两个日期选择窗口。我已经做了手册上的所有事情,但都不起作用。请帮忙

这是我的代码:

@model RebeccaAndLudwig.Models.Rsvp

<head>
    <title>"Please Answer to our invite"</title>
</head>
<section id="contacts" >
    <div class="inner">
        <h2>Answer</h2>
        <div class="content" style="width:700px; margin-left:auto; margin-right:auto; letter-spacing: 1px; word-spacing:normal;">
            <h3>Here you can answer if you will come or not to our wedding, please fill everything out, otherwise we will have problems.</h3>
            <div>
                <div class="contact-form">
                    @using (Html.BeginForm())
                    {
                        @Html.ValidationSummary(true)
                        <div style="color:springgreen">
                            @Html.LabelFor(model => model.FirstName, "First Name:", new { @class = "dob" })
                            @Html.TextAreaFor(model => model.FirstName, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                        </div>
                        <div>
                            @Html.LabelFor(model => model.LastName, "Last Name:", new { @class = "dob" })
                            @Html.TextAreaFor(model => model.LastName, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                        </div>
                        <div>
                            @Html.LabelFor(model => model.AttendWedding, "Attend Wedding?:", new { @class = "dob" })
                            Yes
                            @Html.RadioButtonFor(model => model.AttendWedding, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            No
                            @Html.RadioButtonFor(model => model.AttendWedding, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                        </div>
                        <div>
                            @Html.LabelFor(model => model.WillStayAtHotel, "Will you stay at the hotel?:", new { @class = "dob" })
                            Yes
                            @Html.RadioButtonFor(model => model.WillStayAtHotel, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            No
                            @Html.RadioButtonFor(model => model.WillStayAtHotel, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                        </div>
                        <div>
                            @Html.LabelFor(model => model.HowManyNights, "How Many Nights?:", new { @class = "dob" })
                            1
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            2
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            3
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            4
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            <br />
                            5
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            6
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            7
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                            8
                            @Html.RadioButtonFor(model => model.HowManyNights, new { style = "width: 1000px; height:50px; overflow:hidden;" })
                        </div>
                        <div>
                                @Html.TextBoxFor(model => model.StartDate, "{mm/dd/yyyy}",new {@class="datepicker"})

                                @Html.TextBoxFor(model => model.EndDate, "{mm/dd/yyyy}",new {@class="datepicker"})
                        </div>
                        <div>
                            <input type="submit" value="submit" formaction="@Url.Action("Perform","Contact")" />
                            <input type="reset" value="reset" />
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</section>
    <link href="~/Scripts/jquery-ui.structure.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-ui.structure.min.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-ui.theme.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-ui.theme.min.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-ui.min.css" rel="stylesheet" />
    <link href="~/Scripts/jquery-ui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-ui.js"></script>
    <script src="~/Scripts/jquery-ui.min.js"></script>
    <script src="~/Scripts/external/jquery/jquery.js"></script>


    <script>
        $(function () {
            $(".datepicker").datepicker();
        });
    </script>
正如我所想,也许是款式的问题。但是不,不会有什么不同。不适用于Chrome或Firefox

我的问题是


在日期选择器上没有get函数。我看没有日历,不能选择任何日期。我只看到一个文本框。

jQuery UI构建在jQuery之上,因此请确保首先引用jQuery。

能否详细说明代码“不工作”的原因?你在期待什么,到底发生了什么?如果出现异常,请发布发生异常的行和异常详细信息。如果先加载
jquery.js
,会发生什么?这会让你恢复正常的。这很有效,谢谢你,琼斯!如果你加上这个作为答案,我会把它作为答案
@{
    Layout = null;
}