I have the following code
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="~/Content/bootstrap.css" rel="stylesheet" />
<link href="~/Content/Style/custom.css" rel="stylesheet" />
<link href="~/Content/Style/styleAlert.css" rel="stylesheet" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
<script type="text/javascript">
$(function () {
$("#datepicker").datepicker();
});
</script>
<script src="~/Scripts/jsLogin.js"></script>
</body>
</html>
but it does not allow me to leave both, I get an error message that says
0x800a138a - JavaScript runtime error: Expected a function
I have already changed the order and I have made several changes, but none of them worked, it only works for me if I only place the one:
script src="~ / Scripts / jsLogin.js" > / script >.
Or only when I put
$ (function () { $ ("# datepicker"). datepicker (); });