rem: setDateFieldValue( "exception-dates-text", today ); 
add: setDateFieldValue( "exception-dates-text", startDate ); 
context: function loadCalendarEventDialog(){   // Get arguments, see description at top of file      var args = window.arguments[0];      gMode = args.mode;      gOnOkFunction = args.onOk;   gEvent = args.calendarEvent;      // mode is "new or "edit" - show proper header   var titleDataItem = null;   if( "new" == args.mode )   {      titleDataItem = document.getElementById( "data-event-title-new" );   }   else   {      titleDataItem = document.getElementById( "data-event-title-edit" );   }      var titleString = titleDataItem.getAttribute( "value" );   document.getElementById("calendar-new-eventwindow").setAttribute("title", titleString);   // fill in fields from the event   var startDate = new Date( gEvent.start.getTime() );   var endDate = new Date( gEvent.end.getTime() );   setDateFieldValue( "start-date-text", startDate );   setDateFieldValue( "end-date-text", endDate );   setTimeFieldValue( "start-time-text", startDate );   setTimeFieldValue( "end-time-text", endDate );   gTimeDifference = gEvent.end.getTime() - gEvent.start.getTime(); //the time difference in ms      var today = new Date();   if ( gEvent.recurForever )    {      gEvent.recurEnd.setTime( endDate );   }   var recurEndDate = new Date( gEvent.recurEnd.getTime() );      setDateFieldValue( "repeat-end-date-text", recurEndDate );   //do the stuff for exceptions   var ArrayOfExceptions = gEvent.getExceptions();   while( ArrayOfExceptions.hasMoreElements() )   {      ExceptionTime = ArrayOfExceptions.getNext().QueryInterface(Components.interfaces.nsISupportsPRTime).data;            var ExceptionDate = new Date( ExceptionTime );      addException( ExceptionDate );   }   setDateFieldValue( "exception-dates-text", today );   setFieldValue( "title-field", gEvent.title  );   setFieldValue( "description-field", gEvent.description );   setFieldValue( "location-field", gEvent.location );      setFieldValue( "all-day-event-checkbox", gEvent.allDay, "checked" );   setFieldValue( "private-checkbox", gEvent.privateEvent, "checked" );      if( gEvent.alarm === false && gEvent.alarmLength == 0 )   {      gEvent.alarmLength = gDefaultAlarmLength;   }      setFieldValue( "alarm-checkbox", gEvent.alarm, "checked" );   setFieldValue( "alarm-length-field", gEvent.alarmLength );   setFieldValue( "alarm-length-units", gEvent.alarmUnits );   if ( gEvent.alarmEmailAddress && gEvent.alarmEmailAddress != "" )    {      setFieldValue( "alarm-email-checkbox", true, "checked" );      setFieldValue( "alarm-email-field", gEvent.alarmEmailAddress );   }   else   {      setFieldValue( "invite-checkbox", false, "checked" );   }      if ( gEvent.inviteEmailAddress != undefined && gEvent.inviteEmailAddress != "" )    {      setFieldValue( "invite-checkbox", true, "checked" );      setFieldValue( "invite-email-field", gEvent.inviteEmailAddress );   }   else   {      setFieldValue( "invite-checkbox", false, "checked" );   }      setFieldValue( "repeat-checkbox", gEvent.recur, "checked");   setFieldValue( "repeat-length-field", gEvent.recurInterval );   if( gEvent.recurUnits )       setFieldValue( "repeat-length-units", gEvent.recurUnits );  //don't put the extra "value" element here, or it won't work.   else       setFieldValue( "repeat-length-units", "weeks" );   setFieldValue( "repeat-forever-radio", (gEvent.recurForever != undefined && gEvent.recurForever != false), "selected" );      setFieldValue( "repeat-until-radio", (gEvent.recurForever == undefined || gEvent.recurForever == false), "selected" );      // update enabling and disabling      updateRepeatItemEnabled();   updateStartEndItemEnabled();   updateAlarmItemEnabled();   updateInviteItemEnabled();         updateAddExceptionButton();   //updateAlarmEmailItemEnabled();   /*   ** set the advanced weekly repeating stuff   */   setAdvancedWeekRepeat();      setFieldValue( "advanced-repeat-dayofmonth", ( gEvent.recurWeekNumber == 0 || gEvent.recurWeekNumber == undefined ), "selected" );   setFieldValue( "advanced-repeat-dayofweek", ( gEvent.recurWeekNumber > 0 ), "selected" );      // set up OK, Cancel   doSetOKCancel( onOKCommand, 0 );      // start focus on title      var firstFocus = document.getElementById( "title-field" );   firstFocus.focus();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/ba7d7f8d2aef11bd352a0ab0094b15e508c4fa16/calendarEventDialog.js/buggy/calendar/resources/content/calendarEventDialog.js