rem: var gStartDate = new Date( gCalendarWindow.getSelectedDate() ); 
add:    var gStartDate;  
context:    onDragStart: function (aEvent, aXferData, aDragAction){      // select clicked object, Mozilla doens't do this.      calendarViewClick( aEvent );      // aEvent.currentTarget;      if( aEvent.target.localName == "splitter" || aEvent.target.localName == "menu")         throw Components.results.NS_OK; // not a draggable item      switch (aEvent.target.className) {      case "day-view-event-label-class" :      case "day-view-event-class" :	var eventIsDragged = true ;	this.startDragDayIndex = 0 ;	break;      case "week-view-event-class" :	var eventIsDragged = true ;	this.startDragDayIndex = aEvent.target.getAttribute( "dayindex" );	break;      case "week-view-event-label-class" :	var eventIsDragged = true ;	this.startDragDayIndex = aEvent.target.parentNode.getAttribute( "dayindex" );	break;      default :	var eventIsDragged = false ;      }      if(eventIsDragged == true)      {         // We are going to drag an event         var dragEvents = gCalendarWindow.EventSelection.selectedEvents;         aXferData.data= new TransferData();         aXferData.data.addDataForFlavour("text/calendar", eventArrayToICalString( dragEvents ) );         aXferData.data.addDataForFlavour("text/unicode", eventArrayToICalString( dragEvents, true ) );         //if (aEvent.ctrlKey) { 	 //  action.action = nsIDragService.DRAGDROP_ACTION_COPY ; 	 //}         aEvent.preventBubble();      }      else      {         // Dragging on the calendar canvas to select an event period         // var newDate = gHeaderDateItemArray[dayIndex].getAttribute( "date" );         var gStartDate = new Date( gCalendarWindow.getSelectedDate() );         this.startDateIndex = aEvent.target.getAttribute( "day" );         gStartDate.setHours( aEvent.target.getAttribute( "hour" ) );         gStartDate.setMinutes( 0 );         gStartDate.setSeconds( 0 );         aXferData.data=new TransferData();         aXferData.data.addDataForFlavour("text/calendar-interval", gStartDate.getTime() );         // aDragAction.action = nsIDragService.DRAGDROP_ACTION_MOVE;         aEvent.preventBubble();      }   },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3a4696d402aef88718cef44fff857205bfa4890f/dragDrop.js/clean/calendar/resources/content/dragDrop.js