Topic: Date Picker doesn't appear from Ajax call
I'm making an Ajax call that returns HTML, which is trying to display a Date Picker.
While the Date Picker works upon initial page load (without an Ajax call)... it appears a a regular input box from the Ajax call.
Can you please share how I can re-initialize Date Pickers from dynamically loaded items?
I'm guessing it would be similar to this question previously posted that involved tooltips needing to be re-initialized upon datatable.
Thank you.
kpienkowska staff answered 2 years ago
You need to init your datepicker after it is added with JS:
const myDatepicker = new mdb.Datepicker(document.getElementById('myDatepicker'))
yorkmyers pro premium priority answered 2 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.11.0
- Device: Desktop
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes