Topic: pickatime is not a function
nsavill free asked 4 years ago
I am trying to implement a MDB time picker but I am getting
Uncaught TypeError: $(...).pickatime is not a function
at HTMLDocument.<anonymous> (timepicker.html:32)
at e (jquery.min.js:2)
at t (jquery.min.js:2)
I am using the CDN version of MDB, and all code is copied and pasted straight from your website.
<html>
<!-- JQuery -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.15.0/js/mdb.min.js"></script>
<div class="md-form">
<input placeholder="Selected time" type="text" id="input_starttime" class="form-control timepicker">
<label for="input_starttime">Light version, 12hours</label>
</div>
<script>
$(document).ready(function () {
// Time Picker Initialization
$('#input_starttime').pickatime({});
});
</script>
Please can you advise what I am doing wrong.
Many thanks Nick
Mateusz Łubianka staff answered 4 years ago
Hi @nsavill,
Time picker is MDB Pro Component. https://mdbootstrap.com/docs/jquery/forms/time-picker/ Via CDN you can use only Free version of the MDB. https://mdbootstrap.com/docs/jquery/getting-started/installation-guide/#cdn-installation
Best,
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.15.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No