mdb.Select is not a constructor


Topic: mdb.Select is not a constructor

kampanos pro premium priority asked 3 years ago

I'm using the Calendar plugin, in the Pro version, and having this error:Uncaught TypeError: mdb.Select is not a constructor (calendar.min.js:1)

My project is using Symphony and Twig

The code:<div class="mb-4"><br> <div id="calendar" class="calendar bg-transparent p-0" data-mdb-monday-first="true" data-mdb-weekdays="So, Mo, Di, Mi, Do, Fr, Sa" data-mdb-months="Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember" data-mdb-readonly="true"></div><br> </div>

In the app.js, I made the require: require('mdb-calendar');

And I'm using the script: <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/4.1.0/mdb.min.js"></script>

As I just invoke the calendar in the file, I didn't change any selector.


mlazaru staff answered 3 years ago

Hi,

Have you imported calendar's JS and CSS files? The script you are using is free version, that might be reason why it's not working.

Check out this pro version instalation guides: https://mdbootstrap.com/docs/standard/pro/installation/ https://mdbootstrap.com/docs/standard/pro/plugins-installation/


kampanos pro premium priority commented 3 years ago

Hi,

Yes, I made it already, but still have the same error.


mlazaru staff answered 3 years ago

I have just recreated this error. As I expected this is caused because of using this script:

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/4.1.0/mdb.min.js"></script>

If you followed intructions of pro package instalation guide, you should have mdb.min.js file downloaded and linked it to your project with:

<script type="text/javascript" src="js/mdb.min.js"></script>

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: MDB5 4.1.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No