I am trying to use date picker of jquery in mvc4.
It was giving me error:
Uncaught TypeError: undefined is not a function
My jQuery function is like:
$(document).ready(function () {
$('#dpFrom').datepicker();
});
html part is like:
<input type="text" id="dpFrom" />
I refered :
Uncaught TypeError: undefined is not a function while using jQuery UI
And included :
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
So total javascript became:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#dpFrom').datepicker();
});
</script>
Still its giving me error.
Please help...