Topic: Datepicker issues
Datepicker events are not working, see https://mdbootstrap.com/snippets/standard/danny3445/3659952
demzl25 pro premium priority answered 3 years ago
You must click on the icon on the right and pick a date that you want!
Danny pro premium priority commented 3 years ago
I’m talking about the events, I already have a workaround but they need to update there old docs. We are paying a lot for outdated stuff.
Dawid Wajszczuk staff answered 3 years ago
Events are working fine. See this snippet https://mdbootstrap.com/snippets/standard/d-wajszczuk/3662809 :)
Danny pro premium priority commented 3 years ago
Then update your docs :) https://mdbootstrap.com/docs/standard/forms/datepicker/#docsTabsAPI const myDatepicker = document.getElementById('myDatepicker')
myDatepicker.addEventListener('open.mdb.datepicker', (e) => {
// do something...
})
Dawid Wajszczuk staff commented 3 years ago
And what is wrong in this docs?
Danny pro premium priority commented 3 years ago
This is wrong: const myDatepicker = document.getElementById('myDatepicker') myDatepicker.addEventListener('open.mdb.datepicker', (e) => { // do something... })
Dawid Wajszczuk staff commented 3 years ago
And what exactly is wrong with this working code? https://mdbootstrap.com/snippets/standard/d-wajszczuk/3669045#js-tab-view :)
Danny pro premium priority commented 3 years ago
It was confusing because everywhere there was only an ID on the input, and nowhere on the div. Adding an html example to the javascript was more clear.
Dawid Wajszczuk staff commented 3 years ago
On the other hand, every selector (like here https://mdbootstrap.com/docs/standard/forms/datepicker/#section-translations) is always related to div
element. There is no querySelector for input.
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 3.10.2
- Device: Laptop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes