Can anyone please help me I am struggling with this problem for the past few day. Actually I included all the necessary plugins' but still the
$('#datepicker').datepicker()
function is not defined ERROR.
I included the same plugins' in the other jsp of my projects there the datepicker works perfectly.
This is what I tried.
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
$( '#datepicker' ).datepicker();
It throws the exception on page load itself. Thanks.
Please double check the js files you include if you include the same js file twice are different version of same file twice, It will conflict. Have patient to go through to entire jsp or html file to check the js files.
I just had this issue and solved it using $.noConflict();
:
Instead of $( '#datepicker' ).datepicker();
, I used:
$.noConflict();
jQuery(document).ready(function ($) {
$("#datepicker").datepicker();
});
Spent lots of time on this. Found the issue to datepicker function not found and or not working in Chrome. Using VS2015... Just about everything is dependant on JQuery so it must be at the very top. Use the following references or latest:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css" />
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With