diff --git a/calendar/base/content/calendar-ui-utils.js b/calendar/base/content/calendar-ui-utils.js
index d9757f3742..1d52303ebd 100644
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -397,7 +397,7 @@ function appendCategoryItems(aItem, aCategoryMenuList, aCommand) {
*/
function addMenuItem(aParent, aLabel, aValue, aCommand) {
if (aParent.localName == "menupopup") {
- var item = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem");
+ var item = createXULElement("menuitem");
item.setAttribute("label", aLabel);
if (aValue) {
item.setAttribute("value", aValue);
@@ -665,56 +665,6 @@ function getOptimalMinimumHeight(aXULElement) {
return (firstEntity + secondEntity);
}
-/**
- * Use with textfields oninput to only allow integers
- *
- * @param event The event that contains the target
- * @param lowerBound The lower bound the number should have
- * @param upperBound The upper bound the number should have
- */
-function validateIntegerRange(event, lowerBound, upperBound) {
- validateIntegers(event);
-
- var num = Number(event.target.value);
-
- // Only modify the number if a value is entered, otherwise deleting the
- // value (to maybe enter a new number) will cause the field to be set to the
- // lower bound.
- if (event.target.value != "" && (num < lowerBound || num > upperBound)) {
- event.target.value = Math.min(Math.max(num, lowerBound), upperBound);
- event.preventDefault();
- }
-}
-
-/**
- * Validate Integers, or rather validate numbers. Makes sure the input value is
- * a number.
- *
- * @param event The event that contains the target
- */
-function validateIntegers(event) {
- if (isNaN(Number(event.target.value))) {
- var newValue = parseInt(event.target.value);
- event.target.value = isNaN(newValue) ? "" : newValue;
- event.preventDefault();
- }
-}
-
-/**
- * Make sure the number entered is 0 or more. A negative number is turned
- * positive.
- *
- * @param event The event that contains the target
- */
-function validateNaturalNums(event) {
- validateIntegers(event);
- var num = event.target.value;
- if (num < 0) {
- event.target.value = -1 * num;
- event.preventDefault();
- }
-}
-
/**
* Gets the "other" orientation value, i.e if "horizontal" is passed, "vertical"
* is returned and vice versa.
diff --git a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul
index 64ff032bbf..c101bc7b3d 100644
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul
@@ -114,9 +114,13 @@
disable-on-readonly="true"
disable-on-occurrence="true"
selected="true"/>
-
@@ -298,7 +311,9 @@
orient="horizontal"
align="center">