Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
46
rated 0 times [  51] [ 5]  / answers: 1 / hits: 12462  / 10 Years ago, wed, november 5, 2014, 12:00:00

The following results in: Uncaught TypeError: Cannot read property 'formatDate' of undefined
I have all three files in the same directory (jquery, jquery-ui and this html file):



<html>
<head>
<link rel=stylesheet href=jquery-ui.min.css>
<script src=jquery-1.11.1.min.js</script>
<script src=jquery-ui.min.js</script>
<script>
$(document).ready(function(){
var $t = $.datepicker.formatDate(M dd, new Date(2014-12-01));
console.log($t);
});
</script>
</head>
<body>
</body>
</html>


What am I doing wrong?


More From » jquery

 Answers
8

If this is your actual HTML, you should change



<script src=jquery-1.11.1.min.js</script>
<script src=jquery-ui.min.js</script>


into



<script src=jquery-1.11.1.min.js></script>
<script src=jquery-ui.min.js></script>

[#41454] Tuesday, November 4, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
benitoh

Total Points: 150
Total Questions: 113
Total Answers: 104

Location: India
Member since Wed, Aug 26, 2020
4 Years ago
;