add:  var isAllDay = getElementValue("event-all-day", "checked"); if(isAllDay) gStartTime.isDate = true; 
context: function updateEndTime(){  if(gIgnoreUpdate)    return;      var startWidgetId;  var endWidgetId;  if (isEvent(window.calendarItem)) {    startWidgetId = "event-starttime";    endWidgetId = "event-endtime";  } else {    if (!getElementValue("todo-has-entrydate", "checked"))      gItemDuration = null;    if (!getElementValue("todo-has-duedate", "checked"))      gItemDuration = null;    startWidgetId = "todo-entrydate";    endWidgetId = "todo-duedate";  }  var saveStartTime = gStartTime;  var saveEndTime = gEndTime;  var kDefaultTimezone = calendarDefaultTimezone();  if(gStartTime) {    var start = jsDateToDateTime(getElementValue(startWidgetId));    start = start.getInTimezone(kDefaultTimezone);    var menuItem = document.getElementById('menu-options-timezone');    if(menuItem.getAttribute('checked') == 'true') {      start.timezone = gStartTimezone;    }    gStartTime = start;  }  if(gEndTime) {    var end = jsDateToDateTime(getElementValue(endWidgetId));    end = end.getInTimezone(kDefaultTimezone);    var timezone = gEndTimezone;    if(timezone == "UTC") {      if(gStartTime && gStartTimezone != gEndTimezone) {        timezone = gStartTimezone;      }    }    var menuItem = document.getElementById('menu-options-timezone');    if(menuItem.getAttribute('checked') == 'true') {      end.timezone = timezone;    }    gEndTime = end;  }    // calculate the new duration of start/end-time.  // don't allow for negative durations.  var warning = false;  if(gStartTime && gEndTime) {    if(gEndTime.compare(gStartTime) >= 0) {      gItemDuration = end.subtractDate(start);    } else {      gStartTime = saveStartTime;      gEndTime = saveEndTime;      warning = true;    }  }  updateDateTime();  updateTimezone();    if(warning) {    var callback = function func() {      var promptService =                Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                         .getService(Components.interfaces.nsIPromptService);      promptService.alert(null,document.title,"The end date you entered occurs before the start date.");    }    setTimeout(callback, 1);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c52e7c43eb3ad83686612eca956ebfd2d268f98f/sun-calendar-event-dialog.js/buggy/calendar/prototypes/wcap/sun-calendar-event-dialog.js