rem: if (getElementValue("all-day-event-checkbox", "checked")) {  displayEndDate.setDate( displayEndDate.getDate() - 1 ); 
add: if (componentType == "event") { if (getElementValue("all-day-event-checkbox", "checked")) {  displayEndDate.setDate( displayEndDate.getDate() - 1 ); } setElementValue("end-datetime", displayEndDate); 
context: function onDateTimePick(dateTimePicker){    var startDate      = getElementValue("start-datetime");    var endDate        = getElementValue("end-datetime");    var pickedDateTime = new Date(dateTimePicker.value);    var duration       = ( endDate.getTime() - startDate.getTime() );    if (dateTimePicker.id == "end-datetime") {        if (getElementValue("all-day-event-checkbox", "checked")) {          //display enddate == ical enddate - 1 (for allday events)          pickedDateTime.setDate( pickedDateTime.getDate() + 1 );        }        setElementValue("end-datetime", pickedDateTime);        endDate = getElementValue("end-datetime");        // save the duration        duration = endDate.getTime() - startDate.getTime();        updateOKButton();        return;    }    if (dateTimePicker.id == "start-datetime") {        setElementValue("start-datetime", pickedDateTime);        startDate = getElementValue("start-datetime");        // preserve the previous duration by changing end        endDate.setTime(startDate.getTime() + duration );                var displayEndDate = new Date(endDate)        if (getElementValue("all-day-event-checkbox", "checked")) {          //display enddate == ical enddate - 1 (for allday events)          displayEndDate.setDate( displayEndDate.getDate() - 1 );        }        setElementValue("end-datetime", displayEndDate);    }    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() &&        !getElementValue("repeat-checkbox", "checked") )     {        setElementValue("repeat-end-date-picker", pickedDateTime);    }    updateAdvancedWeekRepeat();    updateAdvancedRepeatDayOfMonth();    updateAddExceptionButton();    updateOKButton();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0e541d864b508733825e804b8ae79192359b7b42/eventDialog.js/clean/calendar/resources/content/eventDialog.js