Datepicker

tmdb pro premium priority asked 2 years ago

Expected behavior

add new datepicker to DOM via Jquery html

Actual behavior

After DOM Element is replaced using jquery.html date picker does not work. css and js not working. Is there a way to reinitialize the datepicker css and js after new element is added to Dom.

Resources (screenshots, code snippets etc.)


mlazaru staff answered 2 years ago

I think this is what you are looking for:

const myDatepicker = new mdb.Datepicker(document.getElementById('myDatepicker'), options)

In case it didn't help, please recreate this problem in snippet.


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: MACOS
  • Browser: MACOS
  • OS: MACOS
  • Provided sample code: No
  • Provided link: No
Tags