Update appointment time check to not auto-fail for same-day

This commit is contained in:
Chloe Herd 2023-07-11 13:05:06 -04:00
parent 56e2c1a517
commit 6361c05cd6

View file

@ -2189,6 +2189,7 @@ async function resetScheduleIfUnavailable(context, order) {
// If you put any kind of time stamp on the date string with dashes, then it IS parsed as local time.
var aptDate = new Date(order.schedule.date + "T00:00:00");
var curDate = new Date();
curDate.setHours(0, 0, 0, 0);
// if appointment date is in the past, clear schedule
if (aptDate.getTime() < curDate.getTime()) {