This is my cshtml code
<div style="text-align: left;">
<div>Start Time?</div>
<input type="text" id="datepickerStart" />
</div>
This is my cshtml code which doesn't work and the datepicker doent show up
$(document).ready(function () {
$("#datepickerStart").datepicker();
});
UNTILL I insert an alert like below
$(document).ready(function () {
alert("HI");
$("#datepickerStart").datepicker();
$("#datepickerEnd").datepicker();
});
My UI is cshtml and all my javascript in a separate .js file and it uses knockout.js
And all my jscript code sits inside a knockout namespace object.
Please share your experience if any and guide me how to resolve the issue.
Below are jquery libraries
</script>
<link href="/Content/normalize.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/>
<link href="/Content/site.css" rel="stylesheet"/>
<link href="/Content/drawer.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.resizable.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.selectable.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.accordion.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.autocomplete.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.button.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.dialog.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.slider.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.tabs.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.datepicker.css" rel="stylesheet"/>
<link href="/Content/themes/base/jquery.ui.theme.css" rel="stylesheet"/>
<script src="/Scripts/libs/modernizr-2.6.2.js"></script>
<script src="/Scripts/libs/jquery-2.0.1.js"></script>
<script src="/Scripts/libs/jquery-ui-1.10.3.js"></script>
<script src="/Scripts/libs/jquery.unobtrusive-ajax.js"></script>
<script src="/Scripts/libs/jquery.validate.js"></script>
<script src="/Scripts/libs/jquery.validate.unobtrusive.js"></script>
<script src="/Scripts/libs/knockout-2.2.1.debug.js"></script>
<script src="/Scripts/libs/knockout.mapping-latest.debug.js">
</script>