rem: var startTime = getDateTimeFieldValue( "start-date-text" ); 
add: var dayNumber = document.getElementById( "start-date-picker" ).value.getDate(); 
context: function updateAdvancedRepeatDayOfMonth(){   //get the day number for today.   var startTime = getDateTimeFieldValue( "start-date-text" );      var dayNumber = startTime.getDate();   var dayExtension = getDayExtension( dayNumber );   var weekNumber = getWeekNumberOfMonth();      document.getElementById( "advanced-repeat-dayofmonth" ).setAttribute( "label", document.getElementById( "onthe-text" ).getAttribute( "value" )+dayNumber+dayExtension+document.getElementById( "ofthemonth-text" ).getAttribute( "value" ) );      if( weekNumber == 4 && isLastDayOfWeekOfMonth() )   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", getWeekNumberText( weekNumber )+" "+getDayOfWeek( dayNumber )+document.getElementById( "ofthemonth-text" ).getAttribute( "value" ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).removeAttribute( "collapsed" );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "label", document.getElementById( "last-text" ).getAttribute( "value" )+getDayOfWeek( dayNumber )+document.getElementById( "ofthemonth-text" ).getAttribute( "value" ) );   }   else if( weekNumber == 4 && !isLastDayOfWeekOfMonth() )   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", getWeekNumberText( weekNumber )+" "+getDayOfWeek( dayNumber )+document.getElementById( "ofthemonth-text" ).getAttribute( "value" ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" );   }   else   {      document.getElementById( "advanced-repeat-dayofweek" ).setAttribute( "label", getWeekNumberText( weekNumber )+" "+getDayOfWeek( dayNumber )+document.getElementById( "ofthemonth-text" ).getAttribute( "value" ) );      document.getElementById( "advanced-repeat-dayofweek-last" ).setAttribute( "collapsed", "true" );   }   }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a8db41c3cf2888eb555ad13d4c2651f31f85a4d3/eventDialog.js/clean/calendar/resources/content/eventDialog.js