Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: Object [object Object] has no method 'datepicker'

this is the error i get when trying to use the datepicker widget: *has no method

<script type="text/javascript" language="javascript">
    $(function () {
        $("#from").datepicker({
            ....         
            }
        });
        $("#to").datepicker({
           ....
            }
        });
    });
</script>

This is the include file i'm using. The confusing part of this is that I use this same includes file on 3 pages and I only get the error on the one page. so it cant really be the script itself...I think

<!-- Datepicker widget -->
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.1.custom.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<link href="css/jquery-ui-1.10.1.custom.min.css" rel="stylesheet" type="text/css" />

any Ideas?

like image 636
user2255811 Avatar asked Apr 28 '13 23:04

user2255811


1 Answers

Fixed there was a jQuery conflict on $ added a jQuery(function($){ which did the trick

like image 159
user2255811 Avatar answered Nov 08 '22 14:11

user2255811