แก้ setEnddate ไม่ตรง

This commit is contained in:
AnandaTon 2023-10-09 13:55:24 +07:00
parent 46be74c2fd
commit 26bd9eeddc
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@
if (endDate) {
const today = new Date();
const endDateDate = new Date(endDate);
endDateDate.setDate(endDateDate.getDate() + 1);
return endDateDate.getTime() < today.getTime();
}
return false;