Topic: How to use JS
constantin-malii pro premium asked 2 years ago
Hello,
I am trying to understand if I am missing out any functionality here. Using the JS package in ASP.NET MVC app. If I use a Dropdown component, for example, and I want to write some JS to handle select and other, do I have to write it all myself or is there already logic in the library that I could use? Thank you!
kpienkowska staff answered 2 years ago
The logic of our components is written. You do not need to handle anything that is not shown in the examples in the documentation. Events are things that you can monitor to add custom functionality f.e custom validation.
If you want to see what code is needed for any component you can see a live example in the documentation. Below components, you have Edit in sandbox
button that enables you to try some modifications of components and shows all code needed to implement a specific example.
Datepicker didn't work after reenable because this component doesn't support the disabled attribute. We add it as an option in components that supports it.
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: MDB5 4.4.0
- Device: Laptop
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No
constantin-malii pro premium commented 2 years ago
I found that the api tab has the events that can be used, like on change.
But running into an issue when trying to disable the datepicker and the button is not clickable after i enable it back: $("#datepickerInput").prop('disabled', false);