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

problem in connecting to server

java mysql jdbc

C:\Users\shilps\Desktop&gt;set PATH=%PATH%;C:\Program Files\Java\jdk1.6.0_22\bin

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.