Default time in timepicker results in: mdb is not defined


Topic: Default time in timepicker results in: "mdb is not defined"

williamw pro premium priority asked a year ago

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 a year 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 a year 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 a year ago

How do you import the js file in the project?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • 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