From 4b89ef65e074f695f1fff39c6f204f1973d7a6b3 Mon Sep 17 00:00:00 2001 From: Philipp Roshchin Date: Fri, 12 Apr 2024 04:51:15 +0300 Subject: [PATCH] added today --- app/schema.py | 2 ++ frontend/src/pages/PredictDay/components/PredictForm.jsx | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/app/schema.py b/app/schema.py index d6d6f94..c95d60f 100644 --- a/app/schema.py +++ b/app/schema.py @@ -96,3 +96,5 @@ class ModelDayInput(BaseModel): VOLUME: str TRADINGSESSION: str VALUE: str + + today: str diff --git a/frontend/src/pages/PredictDay/components/PredictForm.jsx b/frontend/src/pages/PredictDay/components/PredictForm.jsx index 96d1a82..d84ec8f 100644 --- a/frontend/src/pages/PredictDay/components/PredictForm.jsx +++ b/frontend/src/pages/PredictDay/components/PredictForm.jsx @@ -30,6 +30,8 @@ export default function PredictForm({ getPredict, error, setError, success, setS VOLUME: "", TRADINGSESSION: "", VALUE: "", + + today: "", }) async function callFunc(event) { @@ -37,6 +39,8 @@ export default function PredictForm({ getPredict, error, setError, success, setS if (form.CAPITALIZATION && form.CLOSE && form.DIVISOR && form.HIGH && form.LOW && form.OPEN && form.TRADEDATE && form.finance && form.economic && form.politic) { setError("") + var today = new Date().toISOString().split("T")[0] + form.today = today return await getPredict(form) } else { setError("заполните форму")