Skip to content Skip to sidebar Skip to footer

Bootstrap : Uncaught Typeerror: $(...).datetimepicker Is Not A Function

I have just started off with BootStrap, however stranded with Uncaught TypeError: $(...).datetimepicker is not a function error message. Could someone let me know what went missing

Solution 1:

You are using datetimepicker when it should be datepicker. As per the docs. Try this and it should work.

<scripttype="text/javascript">
  $(function () {
    $('#datetimepicker9').datepicker({
      viewMode: 'years'
    });
  });
 </script>

Solution 2:

I had the same problem, you have to load first the Moment.js file!

<scriptsrc="path/moment.js"></script><scriptsrc="path/bootstrap-datetimepicker.js"></script>

Solution 3:

This is a bit late but I know it will help someone:

If you are using datetimepicker make sure you include the right CSS and JS files. datetimepicker uses(Take note of their names);

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.css

and

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js

On the above question asked by @mindfreak,The main problem is due to the imported files.

Solution 4:

You guys copied the wrong code.

Go into the "/build" folder and grab the jquery.datetimepicker.full.js or jquery.datetimepicker.full.min.js if you want the minified version. It should fix it! :)

Solution 5:

You are using an old version of the date picker js. Upgrade datepicker js with latest one.

Replace your bootstrap-datetimepicker.min.js file with this will work..

<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/js/bootstrap-datetimepicker.min.js"></script>

Post a Comment for "Bootstrap : Uncaught Typeerror: $(...).datetimepicker Is Not A Function"