I am using copy 'n paste (ctrlC and ctrlV) in month view. This works fine EXCEPT, when the event is pasted the event description says “00:00” and when I double click pasted event I see the correct start/end times have been pasted and it is only when I save in Lightbox and then exit that the correct start time appears in the event instead of “00:00”.
Hi
pasted event recieves start date based on mouse position. Month view does not allow pointing to specific time of day, mouse position is always resolved as 12am of selected day.
Currently, nothing can be done to change this behavior. Scheduler doesn’t throw any events that would allow to modify event date before pasting it.
We’ll add appropriate events by next update of the component
Hi and thanks for your response. Wouldn’t there be a way to check if we are in Month view, if so, then instead of using Mouse pointer position, get the event start_date and use that instead?
I guess I would like to be able to make and exact copy of the event, in Month view and paste it in another day.
[code]scheduler.attachEvent(“onEventPasted”, function(copy, event, origin){
//restore hours, same as in original event
event.start_date.setHours(origin.start_date.getHours);
event.end_date.setHours(origin.end_date.getHours);
//restore minutes, same as in original event
event.start_date.setMinutes(origin.start_date.getMinutes);
event.end_date.setMinutes(origin.end_date.getMinutes);
//repaint event
scheduler.updateEvent(event.id);
[code] scheduler.attachEvent(“onEventPasted”, function(copy, event, origin){
//restore hours, same as in original event
event.start_date.setHours(origin.start_date.getHours());
event.end_date.setHours(origin.end_date.getHours());
//restore minutes, same as in original event
event.start_date.setMinutes(origin.start_date.getMinutes());
event.end_date.setMinutes(origin.end_date.getMinutes());
//repaint event
scheduler.updateEvent(event.id);
});[/code]