diff --git a/www/javascript/swat-date-entry.js b/www/javascript/swat-date-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-date-entry.js
+++ b/www/javascript/swat-date-entry.js
@@ -87,7 +87,11 @@ SwatDateEntry.prototype.lookup = function(table_name, key)
 
 SwatDateEntry.prototype.reverseLookup = function(table_name, key)
 {
-	return this.reverse_lookup_table[table_name][key];
+	var value = this.reverse_lookup_table[table_name][key];
+	if (value === undefined) {
+		value = null;
+	}
+	return value;
 };
 
 SwatDateEntry.prototype.setCalendar = function(calendar)
diff --git a/www/javascript/swat-time-entry.js b/www/javascript/swat-time-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-time-entry.js
+++ b/www/javascript/swat-time-entry.js
@@ -95,7 +95,11 @@ SwatTimeEntry.prototype.lookup = function(table_name, key)
 
 SwatTimeEntry.prototype.reverseLookup = function(table_name, key)
 {
-	return this.reverse_lookup_table[table_name][key];
+	var value = this.reverse_lookup_table[table_name][key];
+	if (value === undefined) {
+		value = null;
+	}
+	return value;
 };
 
 SwatTimeEntry.prototype.setDateEntry = function(date_entry)
Return null instead of undefined when value is not in lookup table.