Topic: changing datetimepicker value does not trigger containing form onchange event listeners

ikan_nak priority asked 4 months ago


Expected behavior

I have a form which I have an eventListener for the onChange event registered to. This form has a datetimepicker element as well as other elements. I want to automatically do something when any element in the form changes.

Actual behavior

All elements correctly cause the form to emit a change event when the value is updated, apart from the datepicker element. I attached a snippet that shows what I'm doing. When you update the value of the datetimepicker, it should be logging something to console (or in my case executing more complex Javascript code) but it doesn't do this, and breakpoints in the execSearch method aren't triggered.

Resources (screenshots, code snippets etc.)

https://mdbootstrap.com/snippets/standard/ikan_nak/6137357


Kamila Pieńkowska staff answered 4 months ago


You need to publish your snippet for me to have access to it.

Until then I recommend checking out events we provide for Datetimepicker: https://mdbootstrap.com/docs/standard/forms/datetimepicker/#api-section-events


ikan_nak priority commented 4 months ago

Thanks, I published the snippet. Could you check now and see if this is intended behavior?


Kamila Pieńkowska staff commented 4 months ago

It is. We do not trigger change event we trigger valueChanged.mdb.datetimepicker after value of datetimepicker changes via selection in modal.



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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.3.0
  • Device: Desktop computer
  • Browser: Edge
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes