asp.net mvc - jQuery DateTime picker issue -
i using jquery datetime picker on 1 of view. datetime picker working fine on 1 pc. on pc giving error:
microsoft jscript runtime error: object doesn't support property or method 'datepicker'
the jquery code , view same on both pcs. jquery versions same.
below code:
<link href="@url.content("~/content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" /> <link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src="~/scripts/jquery-1.10.2.min.js"></script> <script src="~/scripts/jquery.validate.min.js"></script> <script src="https://code.jquery.com/ui/1.10.2/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready (function () { $(".fromdate").datepicker(); }) </script>
the difference see in app_start folder. pc on error shown has 1 file in folder , routeconfig.cs
the other pc on working fine has couple of files in folder including bundleconfig.cs
is has this?
from comments, have included jquery-1.10.2.min.js
, bootstrap.min.js
in layout. duplicate jquery-1.10.2.min.js
needs removed since order of scripts important. recommend make use of excellent bundling , minification features of mvc explained in this article.
Comments
Post a Comment