Closed joaoestudante closed 5 years ago
I don't see anything wrong, the same code works fine for me.
Go to the demo page and paste the JavaScript code in browser console, it works.
I can confirm that it works on the demo page. On the console on my website, pasting the function successfully returns the objects with the specified class (same as on the demo page).
However, nothing really happens when changing the dates. I believe this must be some sort of conflict with another part of my website (like a navbar).
Thanks for providing the "trick" of pasting the function on the console, at least I know I'm not insane anymore :D and as this is most likely not a problem with the (wonderful btw) module, I'll close the issue. If it appears to be some sort of unintended conflict, then I can reopen it.
Hello. I am trying to do an action whenever a date is picked on the datepicker.
Currently, my date picker portion of the html file looks like this (generated automatically by using the widget on a DateField)
For now, I would just like to be able to print in the console (or get an alert) whenever a date is chosen.
I attempted to add this after the body:
And changing the date had no effect. I also tried to do it like this:
Again, with no effects.
The only thing that I noticed is that an event tag appears (on Inspect element, with Firefox on Linux) on the div, with a dp element on it, referencing my website:
What am I doing wrong? If there is more information needed, I'll be more than glad to offer it.