BootStrap : Uncaught TypeError: $(...).datetimepicker Is Not A Function


Answer :

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

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

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

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


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.


Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Change The Font Size Of Visual Studio Solution Explorer