Datepicker не работает со страницей макета в MVC ?
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Meta, title, CSS, favicons, etc. --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>@ViewBag.Title</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <!-- Bootstrap --> <link href="~/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link href="~/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <!-- NProgress --> <link href="~/nprogress/nprogress.css" rel="stylesheet"> <!-- Custom Theme Style --> <link href="~/build/css/custom.min.css" rel="stylesheet"> </head> <body class="nav-md"> <div class="container body"> <div class="main_container"> <div class="col-md-3 left_col"> <div class="left_col scroll-view"> <div class="navbar nav_title" style="border: 0;"> <a href="index.html" class="site_title"><span>Axon Infosoft</span></a> </div> <div class="clearfix"></div> <!-- menu profile quick info --> @*<div class="profile clearfix"> <div class="profile_pic"> <img src="images/img.jpg" alt="..." class="img-circle profile_img"> </div> <div class="profile_info"> <span>Welcome,</span> <h2>John Doe</h2> </div> <div class="clearfix"></div> </div>*@ <!-- /menu profile quick info --> <br /> <!-- sidebar menu --> <div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> <div class="menu_section"> @*<h3>General</h3>*@ <ul class="nav side-menu"> <li><a>Master <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a>Home <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> </ul> </li> <li><a>Company <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> @*<li><a href="~/Views/Home/Index.cshtml">Employee</a></li>*@ @*@Html.ActionLink("Employee", "Index","Home")*@ @*<li>@Html.ActionLink("Employee", "Index", "Home")</li>*@ <li>@Html.ActionLink("Work Division", "WorkDivision", "WorkDivision")</li> <li>@Html.ActionLink("Store", "StoreUnit", "StoreUnit")</li> <li>@Html.ActionLink("Store Section", "StoreSection", "StoreSection")</li> <li>@Html.ActionLink("Department", "DepartmentIndex", "Department")</li> </ul> </li> <li><a>Interactors <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li>@Html.ActionLink("Agent", "Index", "Agent")</li> <li>@Html.ActionLink("Buyer", "BuyerIndex", "Buyer")</li> <li>@Html.ActionLink("Consignee", "ConsigneeIndex", "Consignee")</li> <li>@Html.ActionLink("Supplier", "SupplierIndex", "Supplier")</li> <li>@Html.ActionLink("Courier", "CourierIndex", "Courier")</li> <li>@Html.ActionLink("Bank", "BankIndex", "Bank")</li> </ul> </li> <li><a>Item <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li>@Html.ActionLink("Item Group", "ItemGroupIndex", "ItemGroup")</li> <li>@Html.ActionLink("Item", "ItemIndex", "Item")</li> <li>@Html.ActionLink("Color Group", "ColorGroupIndex", "ColorGroup")</li> <li>@Html.ActionLink("Color", "ColorIndex", "Color")</li> <li>@Html.ActionLink("Color Code", "ColorCodeIndex", "ColorCode")</li> <li>@Html.ActionLink("Size", "SizeIndex", "Size")</li> </ul> </li> </ul> </li> <li><a>Forms <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="form.html">General Form</a></li> <li><a href="form_advanced.html">Advanced Components</a></li> <li><a href="form_validation.html">Form Validation</a></li> <li><a href="form_wizards.html">Form Wizard</a></li> <li><a href="form_upload.html">Form Upload</a></li> <li><a href="form_buttons.html">Form Buttons</a></li> </ul> </li> <li><a>UI Elements <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="general_elements.html">General Elements</a></li> <li><a href="media_gallery.html">Media Gallery</a></li> <li><a href="typography.html">Typography</a></li> <li><a href="icons.html">Icons</a></li> <li><a href="glyphicons.html">Glyphicons</a></li> <li><a href="widgets.html">Widgets</a></li> <li><a href="invoice.html">Invoice</a></li> <li><a href="inbox.html">Inbox</a></li> <li><a href="calendar.html">Calendar</a></li> </ul> </li> <li><a>Tables <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="tables.html">Tables</a></li> <li><a href="tables_dynamic.html">Table Dynamic</a></li> </ul> </li> <li><a>Data Presentation <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="chartjs.html">Chart JS</a></li> <li><a href="chartjs2.html">Chart JS2</a></li> <li><a href="morisjs.html">Moris JS</a></li> <li><a href="echarts.html">ECharts</a></li> <li><a href="other_charts.html">Other Charts</a></li> </ul> </li> <li><a>Layouts <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="fixed_sidebar.html">Fixed Sidebar</a></li> <li><a href="fixed_footer.html">Fixed Footer</a></li> </ul> </li> </ul> </div> <div class="menu_section"> <h3>Live On</h3> <ul class="nav side-menu"> <li><a>Additional Pages <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="e_commerce.html">E-commerce</a></li> <li><a href="projects.html">Projects</a></li> <li><a href="project_detail.html">Project Detail</a></li> <li><a href="contacts.html">Contacts</a></li> <li><a href="profile.html">Profile</a></li> </ul> </li> <li><a>Extras <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="page_403.html">403 Error</a></li> <li><a href="page_404.html">404 Error</a></li> <li><a href="page_500.html">500 Error</a></li> <li><a href="plain_page.html">Plain Page</a></li> <li><a href="login.html">Login Page</a></li> <li><a href="pricing_tables.html">Pricing Tables</a></li> </ul> </li> <li><a>Multilevel Menu <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="#level1_1">Level One</a> <li><a>Level One<span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li class="sub_menu"><a href="level2.html">Level Two</a> </li> <li><a href="#level2_1">Level Two</a> </li> <li><a href="#level2_2">Level Two</a> </li> </ul> </li> <li><a href="#level1_2">Level One</a> </li> </ul> </li> <li><a href="javascript:void(0)">Landing Page <span class="label label-success pull-right">Coming Soon</span></a></li> </ul> </div> </div> <!-- /sidebar menu --> <!-- /menu footer buttons --> <div class="sidebar-footer hidden-small"> <a data-toggle="tooltip" data-placement="top" title="Settings"> <span class="glyphicon glyphicon-cog" aria-hidden="true"></span> </a> <a data-toggle="tooltip" data-placement="top" title="FullScreen"> <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span> </a> <a data-toggle="tooltip" data-placement="top" title="Lock"> <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> </a> <a data-toggle="tooltip" data-placement="top" title="Logout" href="login.html"> <span class="glyphicon glyphicon-off" aria-hidden="true"></span> </a> </div> <!-- /menu footer buttons --> </div> </div> <!-- top navigation --> <div class="top_nav"> <div class="nav_menu"> <nav> <div class="nav toggle"> <a id="menu_toggle"></a> </div> </nav> </div> </div> <!-- /top navigation --> <div> @RenderBody() </div> <!-- footer content --> <footer> <div class="pull-right"> Axon Infosoft India pvt lmt | <a href="http://www.axonindia.com">Website </a> </div> <div class="clearfix"></div> </footer> <!-- /footer content --> </div> </div> <!-- jQuery --> <script src="~/jquery/dist/jquery.min.js"></script> <!-- Bootstrap --> <script src="~/bootstrap/dist/js/bootstrap.min.js"></script> <!-- FastClick --> <script src="~/fastclick/lib/fastclick.js"></script> <!-- NProgress --> <script src="~/nprogress/nprogress.js"></script> <!-- Custom Theme Scripts --> <script src="~/build/js/custom.min.js"></script> @RenderSection("scripts", required: false) </body> </html>
Что я уже пробовал:
<pre>@model AxonApparels.Models.Supplier @{ ViewBag.Title = "Supplier"; Layout = "~/Views/Shared/_Layout.cshtml"; } <script src="~/AxonScripts/Supplier.js"></script> <link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/ui-darkness/jquery-ui.min.css" rel="stylesheet"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script> <!-- page content --> <div class="right_col" role="main"> <div class="container"> <div class="clearfix"></div> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_title"> <h2>Supplier</h2> <ul class="nav navbar-right panel_toolbox"> <li><a class="collapse-link"></a> </li> <li><a class="close-link"></a> </li> </ul> <div class="clearfix"></div> </div> <div class="x_content"> <div class="container"> @*<h2>Departments Record</h2>*@ <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" onclick="clearTextBox();">Add New Supplier</button><br /> <br /> <table class="table table-bordered table-hover"> <thead> <tr> <th style="visibility: hidden;">ID </th> <th>Supplier Name </th> <th>Address </th> <th>City </th> <th>Status </th> <th>Action </th> </tr> </thead> <tbody class="tbody"> </tbody> </table> </div> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> @* <button type="button" class="close" data-dissmiss="modal"><span aria-hidden="true">×</span></button>*@ <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title" id="myModalLabel">Add Supplier</h4> </div> <div class="modal-body"> <form> <div class="form-group"> <label for="SupplierID">ID</label> <input type="text" class="form-control" id="SupplierID" placeholder="Id" disabled="disabled" /> </div> <div class="form-group"> <table> <tr> <td colspan="2"> <label for="Name">Supplier Name</label> <input type="text" class="form-control" id="Name" placeholder="Name" /> </td> <td colspan="2"> <label for="lookup">Look up</label> <input type="text" class="form-control" id="lookup" placeholder="Look up" /> </td> </tr> <tr> <td colspan="2"> <label for="add1">Address1</label> <input type="text" class="form-control" id="add1" placeholder="Address1" /> </td> <td colspan="2"> <label for="add2">Address2</label> <input type="text" class="form-control" id="add2" placeholder="Address2" /> </td> </tr> <tr> <td colspan="2"> <label for="add3">Address3</label> <input type="text" class="form-control" id="add3" placeholder="Address3" /> </td> <td colspan="2"> <label for="city">City</label> @Html.DropDownListFor(m => m.CityList, Model.CityList, "--Select City--", new { @id = "ddlcity", @class = "form-control" }) </td> </tr> <tr> <td colspan="2"> <label for="zipcode">Zipcode</label> <input type="text" class="form-control" id="zipcode" placeholder="Zipcode" /> </td> <td colspan="2"> <label for="Status">Status</label> <input type="checkbox" class="form-control" id="Status" /> </td> </tr> <tr> <td colspan="2"> <label for="email">Email</label> <input type="text" class="form-control" id="email" placeholder="EMail" /> </td> <td colspan="2"> <label for="phoneno">Phone No</label> <input type="text" class="form-control" id="phoneno" placeholder="Phone No" /> </td> </tr> <tr> <td colspan="2"> <label for="fax">Fax</label> <input type="text" class="form-control" id="fax" placeholder="Fax" /> </td> <td colspan="2"> <label for="telex">Telex</label> <input type="text" class="form-control" id="telex" placeholder="Telex" /> </td> </tr> <tr> <td colspan="2"> <label for="cstno">CST No</label> <input type="text" class="form-control" id="cstno" placeholder="CST No" /> </td> <td colspan="2"> <div> <label for="cstdate">CST Date</label> </div> <div> <input class="form-control" id="cstdate" type="text"> </div> </td> </tr> <tr> <td colspan="2"> <label for="tinno">Tin No</label> <input type="text" class="form-control" id="tinno" placeholder="Tin No" /> </td> <td colspan="2"> <div> <label for="tindate">Tin Date</label> </div> <div> <input class="form-control" id="tindate" type="text"> </div> </td> </tr> <tr> <td colspan="2"> <label for="contactname">Contact Name</label> <input type="text" class="form-control" id="contactname" placeholder="Contact Name" /> </td> <td colspan="2"> <label for="panno">Pan No</label> <input type="text" class="form-control" id="panno" placeholder="Pan No" /> </td> </tr> <tr> <td colspan="2"> <label for="mobno">Mob No</label> <input type="text" class="form-control" id="mobno" placeholder="Pan No" /> </td> </tr> </table> </div> </form> <form> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" id="btnAdd" onclick="return Add();">Add</button> <button type="button" class="btn btn-primary" id="btnUpdate" style="display: none;" onclick="Update();">Update</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> @*@System.Web.Optimization.Scripts.Render("~/bundles/jqueryval")*@ <script type="text/javascript"> $(document).ready(function () { $("#tindate").datepicker({ format: 'dd-mm-yyyy' }); $("#cstdate").datepicker({ format: 'dd-mm-yyyy' }); }); </script> <!-- /page content -->