Uncaught TypeError: Object [object Object] does not have a 'datepicker' method

this is the error I get when trying to use the datepicker widget: * does not have a method

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

This is the inclusion file I am using. The confusing part of this is that I use the same thing as a 3-page file, and I get an error on only one page. so it cannot really be a 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?

+5
source share
3 answers

Fixed jQuery conflict on $ added jQuery(function($){that did the trick

+12
source

, - p:calendar a4j:outputPanel.

p:outputPanel a4j .

0

Yes, the above solution worked for me too! Here is the complete code for anyone not quite sure ... jQuery (function ($) {$ ("# DatePicker") DatePicker ().});

0
source

All Articles