diff --git a/www/js/control/ProfileSettings.tsx b/www/js/control/ProfileSettings.tsx index 0c6101c48..4a33a6a68 100644 --- a/www/js/control/ProfileSettings.tsx +++ b/www/js/control/ProfileSettings.tsx @@ -297,10 +297,10 @@ const ProfileSettings = () => { if (!uiConfig?.reminderSchemes) return logWarn('In updatePrefReminderTime, no reminderSchemes yet, skipping'); if (storeNewVal) { - const m = DateTime.fromISO(newTime); + const dt = DateTime.fromJSDate(newTime); // store in HH:mm setReminderPrefs( - { reminder_time_of_day: m.toFormat('HH:mm') }, + { reminder_time_of_day: dt.toFormat('HH:mm') }, uiConfig.reminderSchemes, isScheduling, setIsScheduling, diff --git a/www/js/splash/notifScheduler.ts b/www/js/splash/notifScheduler.ts index b059aa3cd..00f24571d 100644 --- a/www/js/splash/notifScheduler.ts +++ b/www/js/splash/notifScheduler.ts @@ -24,7 +24,11 @@ const calcNotifTimes = (scheme, dayZeroDate, timeOfDay): DateTime[] => { .plus({ days: d }) .toFormat('yyyy-MM-dd'); const notifTime = DateTime.fromFormat(date + ' ' + timeOfDay, 'yyyy-MM-dd HH:mm'); - notifTimes.push(notifTime); + if (notifTime.isValid) { + notifTimes.push(notifTime); + } else { + displayErrorMsg('Cannot schedule notifs with invalid time of day: ' + timeOfDay); + } } } return notifTimes;