We've added a new API, Calendar.getDateFromPoint(Integer x, Integer y, Boolean snapOffsets).
If called with no parameters, it will return the snap-date closest to the point of the last mouse-event.
So, in your case, just add this code:
These changes will hit nightly builds from August 5
If called with no parameters, it will return the snap-date closest to the point of the last mouse-event.
So, in your case, just add this code:
Code:
newEvent.setStartDate(sl.timeline.getDateFromPoint());
Comment