rem:  userEndDate.setDate( userEndDate.getDate() - 1 ); 
add:  displayEndDate.setDate( displayEndDate.getDate() - 1 ); 
context: function onDateTimePick( dateTimePicker ){   var pickedDateTime = new Date( dateTimePicker.value);   if( dateTimePicker.id == "end-datetime" )   {     if( getFieldValue( "all-day-event-checkbox", "checked" ) ) {       //user enddate == ical enddate - 1 (for allday events)       pickedDateTime.setDate( pickedDateTime.getDate() + 1 );     }     gEndDate = pickedDateTime;     // save the duration     gDuration = gEndDate.getTime() - gStartDate.getTime();     updateOKButton();     return;   }   if( dateTimePicker.id == "start-datetime" )   {     gStartDate = pickedDateTime;     // preserve the previous duration by changing end     gEndDate.setTime( gStartDate.getTime() + gDuration );          var userEndDate =new Date(gEndDate)     if( getFieldValue( "all-day-event-checkbox", "checked" ) ) {       //user enddate == ical enddate - 1 (for allday events)       userEndDate.setDate( userEndDate.getDate() - 1 );     }     document.getElementById( "end-datetime" ).value = userEndDate;   }   var now = new Date();   // change the end date of recurring events to today,    // if the new date is after today and repeat is not checked.   if ( pickedDateTime.getTime() > now.getTime() &&        !getFieldValue( "repeat-checkbox", "checked" ) )    {     document.getElementById( "repeat-end-date-picker" ).value = pickedDateTime;   }   updateAdvancedWeekRepeat();   updateAdvancedRepeatDayOfMonth();   updateAddExceptionButton();   updateOKButton();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/2a7349746d1b8ad63997e0686ff6c110f5690875/eventDialog.js/clean/calendar/resources/content/eventDialog.js