Datetimepicker: Datepicker throws Javascript exception when


Topic: Datetimepicker: Datepicker throws Javascript exception when selecting a date

ikan_nak pro premium priority asked 5 days ago

Expected behavior

I do not expect random TypeErrors during use.

Actual behavior

When selecting a date in a Datepicker as part of a datetimepicker element, the Datepicker throws an uncaught TypeError during the updating of the header date. More precisely, it tries to call querySelector on a null element, with the null element supposedly being the container object.

mdb.umd.min.js:20 
 Uncaught TypeError: Illegal invocation
    at Object.findOne (mdb.umd.min.js:20:7124)
    at _b._updateHeaderDate (mdb.umd.min.js:39:303913)
    at _b._handleDateSelection (mdb.umd.min.js:39:303788)
    at HTMLDivElement.<anonymous> (mdb.umd.min.js:39:303356)
    at HTMLDivElement.i (mdb.umd.min.js:20:4008)


Resources (screenshots, code snippets etc.)

Snippet that shows the error: https://mdbootstrap.com/snippets/standard/ikan_nak/6380644 (use the browser console to view the error).


Kamila Pieńkowska staff answered 2 days ago

The error does not occur in the snippet. Can you describe how to reproduce it?


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 8.1.0
  • Device: Desktop computer
  • Browser: Edge
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes