rem: var startTime = getDateTimeFieldValue( "start-date-text" );  var dayNumber = startTime.getDay(); 
add: var dayNumber = document.getElementById( "start-date-picker" ).value.getDay(); 
context: function setAdvancedWeekRepeat(){   var checked = false;   if( gEvent.recurWeekdays > 0 )   {      for( var i = 0; i < 7; i++ )      {         checked = ( ( gEvent.recurWeekdays | eval( "kRepeatDay_"+i ) ) == eval( gEvent.recurWeekdays ) );                  setFieldValue( "advanced-repeat-week-"+i, checked, "checked" );         setFieldValue( "advanced-repeat-week-"+i, false, "today" );      }   }     //get the day number for today.   var startTime = getDateTimeFieldValue( "start-date-text" );      var dayNumber = startTime.getDay();      setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "checked" );   setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "disabled" );   setFieldValue( "advanced-repeat-week-"+dayNumber, "true", "today" );   }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a8db41c3cf2888eb555ad13d4c2651f31f85a4d3/eventDialog.js/clean/calendar/resources/content/eventDialog.js