Topic: Default time in timepicker results in: "mdb is not defined"
Expected behavior The mdb 5 timepicker and datepickers will allow for a default time to be displayed.
Actual behavior When copying the example javascript in the mdb 5 docs the console returns: 'Uncaught ReferenceError: mdb is not defined'.
Resources (screenshots, code snippets etc.) //Default time date 12h const pickerStartedWithDate12h = document.querySelector('.id_time_picker'); const tmStartedWithDate12h = new mdb.Timepicker(pickerStartedWithDate12h, { defaultTime: new Date(), });
Grzegorz Bujański staff answered 4 years ago
I checked it in our snippets and everything works fine. It looks like this is a configuration problem for your environment. Do you use some framework or pure JS?
williamw pro premium priority commented 4 years ago
Thanks for checking.
I am using MDB UI KIT Pro Essential 3.0.0 and am pulling in;
css/mdb.min.css & js/mdb.min.js
Grzegorz Bujański staff commented 4 years ago
How do you import the js file in the project?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: 3.0.0
- Device: Custom Build
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes