From 7f60c9904ca73d8978f4b562f467560ea7bb11ef Mon Sep 17 00:00:00 2001 From: Alphons <93847055+Crazypersonalph@users.noreply.github.com> Date: Fri, 9 Feb 2024 20:29:27 +0800 Subject: [PATCH] fixed broken home page notices --- src/SEQTA.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index cc96e589..208ea6ef 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -2278,9 +2278,9 @@ async function loadHomePage() { // Formats the current date used send a request for timetable and notices later const TodayFormatted = - date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() < 10 ? '0' : '') + date.getDate() + date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? '0' : '') + (date.getMonth() + 1) + '-' + (date.getDate() < 10 ? '0' : '') + date.getDate() - callHomeTimetable(TodayFormatted, true) + callHomeTimetable(TodayFormatted, true) const timetablearrowback = document.getElementById('home-timetable-back') @@ -2490,7 +2490,8 @@ async function loadHomePage() { } // Data sent as the POST request const dateControl = document.querySelector('input[type="date"]') as HTMLInputElement - xhr2.send(JSON.stringify({ date: dateControl!.value })) + console.log(dateControl.value) + xhr2.send(JSON.stringify({ date: dateControl.value })) function onInputChange (e: any) { xhr2.open('POST', `${location.origin}/seqta/student/load/notices?`, true) xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8')