Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: mdb.Select is not a constructor

kampanos priority asked 2 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.


Mateusz Lazaru staff answered 2 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>

Mateusz Lazaru staff answered 2 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 priority commented 2 years ago

Hi,

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



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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.1.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: No