Jquery datepicker doesn't show

This is sample code. On load i can see dateofbirth changing to 08-06-1990 but on clicking the textbox the datepicker is not shown. The layout.cshtml contains following

<script src="~/Scripts/jquery-1.7.1.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>  

and i can see they are loaded in firebug.I have removed the EditorFor and have instead used just of testing. Any idea.

@model SMS.Model.Student

    ViewBag.Title = "Edit";

<script type="text/javascript">


@using (Html.BeginForm())


        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.RegistrationNo)
        <div class="editor-field">
            @Html.EditorFor(model => model.RegistrationNo)
            @Html.ValidationMessageFor(model => model.RegistrationNo)

        <div class="editor-label">
            @Html.LabelFor(model => model.DateofBirth)

        <input  id="DateofBirth" value="07-06-1990" />

            <input  type="submit" value="Save" />

    @Html.ActionLink("Back to List", "Index")

@section Scripts {


It works now. I noticed that my layout.cshtml had

 @RenderSection("scripts", required: false)

in the body section and i was explicitly referencing the jquery and jquery ui using loading the the jquery file twice causing this issue. I removed this from header

<script src="~/Scripts/jquery-1.7.1.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>

and moved


to header and added jqueryui to the header. It works perfectly.


Need Your Help

How can I stop cURL from using 100 Continue?

php jquery curl proxy

So, long story short, I have an AJAX application that uses MVC Web API as the back end. The client however calls from a different domain and uses a PHP proxy file to get around cross-domain request

Create the XML files that are in a powerpoint presentation?

javascript xml powerpoint

A MS powerpoint (.pptx) presenation is essentially a zip of a bunch of XML files.