mdb-select disabled cannot be added with jquery

Topic: mdb-select "disabled" cannot be added with jquery

lmcosorio asked 3 years ago

Not able to add attribute "disabled" to <select class="mdb-select md-form" id="myid"></select> with jquery $('#myid').prop('disabled', true);

What I have tried:

$("#myid").attr("disabled"); And similar solutions. By the way works perfectly with <select class="browser-default custom-select" id="myid"></select>

Any help appreciated.

Thank you.

lmcosorio commented 3 years ago

I have found some sort of solution. As mdb-select structure is different, you have to target input inside the div. For example: $(' input').prop('disabled', true);

Mateusz Łubianka staff answered 3 years ago


If you want to use your ID, check out my snippet:


Please insert min. 20 characters.


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



Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.10
  • Device: Laptop
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No