Closed steveb85 closed 7 months ago
With event delegation it works:
const el = document.getElementById('ec');
const ec = new EventCalendar(el, {
view: 'timeGridWeek'
});
el.addEventListener('click', function (e) {
console.log(el.contains(e.target.closest('.ec-button')));
});
I hope I can close this issue.
Thanks, this worked for me!
Adding a function on event listener for .ec-button works for all buttons except the today button, which seems to go into disabled before the event listener receives it.
Haven’t been able to find any work around and have had to remove the button for now!
Otherwise loving it, thanks