From 3d4a589e5dc8f97a5fe94f5f8f42b97f2b6c7b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Fri, 19 May 2023 17:34:29 -0600 Subject: The date selection was MUCH easier than I thought... I'm mad. :C --- src/ToDo.jsx | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/ToDo.jsx b/src/ToDo.jsx index 569c8f4..dbbd081 100644 --- a/src/ToDo.jsx +++ b/src/ToDo.jsx @@ -15,6 +15,7 @@ export function NewToDo() { const dispatch = useDispatch(); const [new_text, set_new_text] = useState(""); + const [new_due_date, set_new_due_date] = useState(""); const [new_done, set_new_done] = useState(false); const [new_priority, set_new_priority] = useState("Low"); @@ -23,6 +24,7 @@ export function NewToDo() { $("form").get(0).reset(); // Reset form set_new_text(""); + set_new_due_date(""); set_new_done(false); set_new_priority("Low"); } @@ -88,15 +90,17 @@ export function NewToDo() {
- - -
{ + set_new_due_date( + e.target.value + ); + }} />
- - -
{ + set_edit_due_date( + e.target.value + ); + }} />