Ionic2-Calendar
Ionic2-Calendar copied to clipboard
onTimeSelected(ev) problem
It seems like it doesn't really select the time you click on but it selects the starting time of an event you click if there is any, how to fix that?
@Astacius You mean in the weekview and dayview? The root cause is because the event element is floating on the calendar table. Once you click it, the event element (which starts from the startTime cell) is handling the click event, instead of the real underlying timeslot. If you click a cell that is not overlapped by an event, the time should be correct. I'm still thinking a way to handle the first case, maybe using the cursor pointer to do the calculation.
Simply using CSS by adding 'pointer-events: none;' to the classes 'calendar-event-wrap' or 'calendar-event' could help for the beginning of a temporary solution (at least for the browser platform). The child elements pointer-events can also be controlled individually. But i suggest that it should be an togglable option. Probably a better alternative would be to change the design?
More here: developer.mozilla.org or in much more details www.w3.org
I encounter the same issue. Maybe is it possible to left some empty space on one side of the events? It would permit user to select the event or the empty zone.
This solution seems to be only possible modifying the inline width of calendar-event? 1 event --> width : 50% (50% empty) 2 events --> width : 66% (33% empty) and so on. Is it possible?