Hi All adn sorry fr my english,
I think that I have found a little error on function _addDroppableToWeekDay where top calcutations are done.
Actual code only uses ui.position.top to calculate the time slot to drop the new element but not the scroll of wc-scrollable-grid. This causes that all events are placed starting at 00:00.
I have made a little change to prevent this, next my code:
var headerHeight = self.element.find(".wc-header").outerHeight();
var navHeight = self.element.find(".wc-nav").outerHeight();
navHeight = navHeight == null ? 0 : navHeight;
var $scrollable = self.element.find(".wc-scrollable-grid");
var top = ($scrollable.scrollTop() - (headerHeight + navHeight)) + Math.round(parseInt(ui.position.top));
var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $calEvent, top);
I am using v 1.2.2 and with this change I put correct my event when I drop it over weekcalendar.
Hi All adn sorry fr my english, I think that I have found a little error on function _addDroppableToWeekDay where top calcutations are done. Actual code only uses ui.position.top to calculate the time slot to drop the new element but not the scroll of wc-scrollable-grid. This causes that all events are placed starting at 00:00.
I have made a little change to prevent this, next my code:
var headerHeight = self.element.find(".wc-header").outerHeight(); var navHeight = self.element.find(".wc-nav").outerHeight(); navHeight = navHeight == null ? 0 : navHeight; var $scrollable = self.element.find(".wc-scrollable-grid"); var top = ($scrollable.scrollTop() - (headerHeight + navHeight)) + Math.round(parseInt(ui.position.top)); var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $calEvent, top);
I am using v 1.2.2 and with this change I put correct my event when I drop it over weekcalendar.