Fix bug 463275 - Edit Recurrence dialog shows wrong rule when editing event. r=ssitter
authorPhilipp Kewisch <mozilla@kewis.ch>
Sat, 24 Jan 2009 06:32:00 +0100
changeset 8345 207439d394f904745ab555e374ec8a91ef911d87
parent 8344 8c418cb8fd8e371128e47278076afe1fd6cdb620
child 8346 2c81a6328404ddbac3258dce05a6933532d7b107
push idunknown
push userunknown
push dateunknown
reviewersssitter
bugs463275
Fix bug 463275 - Edit Recurrence dialog shows wrong rule when editing event. r=ssitter
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-event-dialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -211,16 +211,20 @@ function initializeControls(rule) {
             setElementValue("yearly-month-ordinal", byMonthRuleComponent[0]);
             setElementValue("yearly-days", byMonthDayRuleComponent[0]);
         } else if (byDayRuleComponent.length > 0) {
             document.getElementById("yearly-group").selectedIndex = 1;
             var ruleInfo = getOrdinalAndWeekdayOfRule(byDayRuleComponent[0]);
             setElementValue("yearly-ordinal", ruleInfo.ordinal);
             setElementValue("yearly-weekday", ruleInfo.weekday);
             setElementValue("yearly-month-rule", byMonthRuleComponent[0]);
+        } else if (byMonthRuleComponent.length > 0) {
+            document.getElementById("yearly-group").selectedIndex = 0;
+            setElementValue("yearly-month-ordinal", byMonthRuleComponent[0]);
+            setElementValue("yearly-days", startDate.day);
         }
     }
 
     /* load up the duration of the event radiogroup */
     if (rule.isByCount) {
         if (rule.count == -1) {
             setElementValue("recurrence-duration", "forever");
         } else {
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -2701,16 +2701,17 @@ function updateDateTime() {
                 setElementValue("todo-entrydate", startTime.jsDate);
                 setElementValue("todo-duedate", endTime.jsDate);
             }
         }
     }
 
     updateTimezone();
     updateAllDay();
+    updateRepeatDetails();
 
     gIgnoreUpdate = false;
 }
 
 /**
  * This function initializes the following controls:
  * - 'timezone-starttime'
  * - 'timezone-endtime'