Uncaught TypeError: $(...).datepicker is not a function

6,965 views
Skip to first unread message

Amit Gairola

unread,
Aug 22, 2016, 4:51:47 PM8/22/16
to bootstrap-datepicker
I am trying to use the Datepicker in my html page and it does not work. I also created a dummy html page with just one field and it does not work there too. I get the error (as mentioned in the question title).

Here is my HTML code.

<html>
<head>


  
</head>

<body>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-3">
<div class="input-group date" data-provide="datepicker-inline">
    <input type="text" id="example10" class="form-control">
    <div class="input-group-addon">
        <span class="glyphicon glyphicon-th"></span>
    </div>
</div>
</div>

</div>

<script type="text/javascript">
  
    $("#example10").datepicker({format: "dd/mm/yyyy"});
  
  </script>
</body>
</html>

Harald Geving

unread,
Sep 1, 2016, 7:11:26 PM9/1/16
to bootstrap-datepicker
Have a look at your last <script> in the header!
If you replace "<script ref=" with "<script src=", it should work!


On Monday, August 22, 2016 at 10:51:47 PM UTC+2, Amit Gairola wrote:
I am trying to use the Datepicker in my html page and it does not work. I also created a dummy html page with just one field and it does not work there too. I get the error (as mentioned in the question title).

Here is my HTML code.
[...]
[...]
Reply all
Reply to author
Forward
0 new messages