rem: var startDate = jsDateToDateTime(getElementValue("event-starttime")); var endDate = jsDateToDateTime(getElementValue("event-endtime")); if (endDate.compare(startDate) == -1) { 
add: var startDate; var endDate; if (isEvent(window.calendarItem)) { startDate = jsDateToDateTime(getElementValue("event-starttime")); endDate = jsDateToDateTime(getElementValue("event-endtime")); } else { startDate = getElementValue("todo-has-entrydate", "checked") ? jsDateToDateTime(getElementValue("todo-entrydate")) : null; endDate = getElementValue("todo-has-duedate", "checked") ? jsDateToDateTime(getElementValue("todo-duedate")) : null; }  var timeWarning = document.getElementById("end-time-warning"); if (endDate && startDate && endDate.compare(startDate) == -1) { 
context: function updateAccept(){    var acceptButton = document.getElementById("calendar-event-dialog").getButton("accept");    var title = getElementValue("item-title");    if (title.length == 0)        acceptButton.setAttribute("disabled", "true");    else if (acceptButton.getAttribute("disabled"))        acceptButton.removeAttribute("disabled");    // don't allow for end dates to be before start dates    var startDate = jsDateToDateTime(getElementValue("event-starttime"));    var endDate = jsDateToDateTime(getElementValue("event-endtime"));    if (endDate.compare(startDate) == -1) {        acceptButton.setAttribute("disabled", "true");    } else if (acceptButton.getAttribute("disabled")) {        acceptButton.removeAttribute("disabled");    }    // can't add/edit items in readOnly calendars    document.getElementById("read-only-item").setAttribute("hidden", !gReadOnlyMode);    var cal = document.getElementById("item-calendar").selectedItem.calendar;    document.getElementById("read-only-cal").setAttribute("hidden",                                               !cal.readOnly);    if (gReadOnlyMode || cal.readOnly) {        acceptButton.setAttribute("disabled", "true");    }    return;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/edb75cb3aa7fe2a0098e7d7a97a91ce5dd7f6556/calendar-event-dialog.js/clean/calendar/base/content/calendar-event-dialog.js