I don't know if this is a bug in joomla or in my brain
I have a form with a calendar field
I have javascript that does a calculation on the value of the field and inserts the value into a new field
The javascript is triggered by fieldname.addEventListener("change",
If I manually enter a date in the field then the javascript is triggered and everything is good
If I select a date with the datepicker then the javascript is never triggered (no console errors)
Is it me or is it a bug in the calendar field
Labels |
Added:
?
|
Glad to hear that its not my brain failure
Try like in this comment #17515 (comment)
but like this:
in calendar.js:
this.inputField.dispatchEvent(new CustomEvent('change', {bubbles: true, cancelable: true}));
then in your code you should be able to use:
yourField.addEventListener("change", ...
I not tested, in theory should work
Thanks I will take a look tonight
btw, the Issue from 2017,
well, that need to fix someday
btw, the Issue from 2017,
well, that need to fix someday?
I suggest we do it in 2023
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-20 09:21:58 |
Closed_By | ⇒ | alikon |
that a bug,
if I right remember there was an issue about it (maybe for j3)