bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

eventClick date property inconsistent between Scheduler and Calendar #9870

Closed ExtAnimal closed 2 months ago

ExtAnimal commented 2 months ago

Forum post

In Scheduler, the date property is calculated from the mouse position cross the timeline.

In Calendar, the date property is ascertained from the DOM containment hierarchy of the element clicked on, so If in MonthView you click on "Bryntum Hackathon" where it crosses the 18th Oct 2023, the actual element is a long element rooted in the 15th Oct, so the date comes through in that event as 15th Oct:

Screenshot 2024-08-22 at 14 22 42

Changing Calendar to be in line with Scheduler would change the API, but would not break apps since in these cases (long events) the date returned is not that useful. It's not always the start date, just the start date of the current row.