Fix issue where you can't remove a time set in Configs (#1760)

* Fix issue where config times (start, end, freeze times) could not be removed
This commit is contained in:
Kevin Chung
2020-12-10 15:47:27 -05:00
committed by GitHub
parent eabf43f980
commit e1991e1696
3 changed files with 7 additions and 7 deletions

View File

@@ -41,11 +41,7 @@ function loadDateValues(place) {
const timezone_string = $("#" + place + "-timezone").val();
const utc = convertDateToMoment(month, day, year, hour, minute);
if (isNaN(utc.unix())) {
$("#" + place).val("");
$("#" + place + "-local").val("");
$("#" + place + "-zonetime").val("");
} else {
if (utc.unix() && month && day && year && hour && minute) {
$("#" + place).val(utc.unix());
$("#" + place + "-local").val(
utc.format("dddd, MMMM Do YYYY, h:mm:ss a z (zzz)")
@@ -53,6 +49,10 @@ function loadDateValues(place) {
$("#" + place + "-zonetime").val(
utc.tz(timezone_string).format("dddd, MMMM Do YYYY, h:mm:ss a z (zzz)")
);
} else {
$("#" + place).val("");
$("#" + place + "-local").val("");
$("#" + place + "-zonetime").val("");
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long