rem: newEndDate = new Date( timepopup.value.getFullYear(), timepopup.value.getMonth(), timepopup.value.getDate(), 23, 55, 0); 
add: document.getElementById( "end-date-picker" ).value = newEndDate; 
context: function onTimePick( timepopup ){      //get the new end time by adding on the time difference to the start time.   newEndDate = timepopup.value.getTime() + gTimeDifference;         newEndDate = new Date( newEndDate );   if ( newEndDate.getDate() != timepopup.value.getDate() ) //if this moves us to tomorrow...   {      //put us back at today, with a time of 11:55 PM.      newEndDate = new Date( timepopup.value.getFullYear(),                             timepopup.value.getMonth(),                             timepopup.value.getDate(),                             23,                             55,                             0);   }      if( timepopup.timeField.id != "end-time-text" )   {      setTimeFieldValue( "end-time-text", newEndDate );   }         if ( ( timepopup.timeField.id == "end-time-text" ) )    {      //if we are changing the end time, change the global duration.      var EndTime = new Date( timepopup.value.getTime() );      var StartTimeElement = document.getElementById( "start-time-text" );      var StartTime = StartTimeElement.editDate;            gTimeDifference = EndTime - StartTime; //the time difference in ms            if ( gTimeDifference < 0 )       {         gTimeDifference = 0;      }   }      // display the new time in the textbox   timepopup.timeField.value = formatTime( timepopup.value );      // remember the new date in a property, "editDate".  we created on the time textbox      timepopup.timeField.editDate = timepopup.value;   updateOKButton();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9dddeffa11c35a833751a5043912aeb13f3821bf/calendarEventDialog.js/clean/calendar/resources/content/calendarEventDialog.js