I am using this code from here:
http://jqueryui.com/datepicker/
I put this code on my website:
<script type="text/javascript">
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker2" ).datepicker();
$( "#datepicker3" ).datepicker();
$( "#datepicker4" ).datepicker();
});
</script>
In the Firefox firebug console, I see this error:
TypeError: $(...).datepicker is not a function
$( "#datepicker" ).datepicker();
the #datepicker pulls the field tag into it. Why does it say that datepicker() is not a function? if I have the rest of the code above it:
<link rel="stylesheet" type="text/css" href="/css/dateTimepicker/jquery.datetimepicker.css"/>
<script src="/css/dateTimepicker/jquery.js"></script>
<script src="/css/dateTimepicker/jquery.datetimepicker.js"></script>
<style type="text/css">
.custom-date-style { background-color: red !important; }
</style>
I have put that code above it and below it and it does not matter. That error is always there.
Can you tell me how to fix it?
Also, I do use other scripts that pull in jQuery, and have a jquery.js file.
Could they be causing a conflict?
Thanks, Richard
});at the end of script. Secondly, are you sure that /css/dateTimepicker/jquery.datetimepicker.js is correct way (why JS file is in CSS directory and why it is "datetimepicker.js", not "datepicker.js")?<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>between jQuery and datepicker scripts.