From 09fa99e89c9512b8fcf70b8eaf1aeb63c5e9aa7e Mon Sep 17 00:00:00 2001 From: Michael Fatemi Date: Wed, 23 Jun 2021 14:31:16 -0400 Subject: [PATCH] temporary working eventcreator --- src/components/NewUI/EventCreator.tsx | 3 ++- src/components/NewUI/UIDatetimeInput.tsx | 8 +++++++- src/components/NewUI/UIPlacesAutocomplete.tsx | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/NewUI/EventCreator.tsx b/src/components/NewUI/EventCreator.tsx index 96c2cb0..ee1a451 100644 --- a/src/components/NewUI/EventCreator.tsx +++ b/src/components/NewUI/EventCreator.tsx @@ -20,12 +20,13 @@ export default function EventCreator() { startTime, endTime, groupId, + placeId, }), headers: { 'Content-Type': 'application/json', }, }); - }, [name, startTime, endTime, groupId]); + }, [name, startTime, endTime, groupId, placeId]); return ( diff --git a/src/components/NewUI/UIDatetimeInput.tsx b/src/components/NewUI/UIDatetimeInput.tsx index 156a6d3..e7197c6 100644 --- a/src/components/NewUI/UIDatetimeInput.tsx +++ b/src/components/NewUI/UIDatetimeInput.tsx @@ -16,7 +16,13 @@ export default function UIDatetimeInput({ onChangedDate(e.target.valueAsDate)} + onChange={(e) => { + const number = e.target.valueAsNumber; + if (!isNaN(number)) { + const date = new Date(number); + onChangedDate(date); + } + }} /> ); } diff --git a/src/components/NewUI/UIPlacesAutocomplete.tsx b/src/components/NewUI/UIPlacesAutocomplete.tsx index 28889fa..55d875a 100644 --- a/src/components/NewUI/UIPlacesAutocomplete.tsx +++ b/src/components/NewUI/UIPlacesAutocomplete.tsx @@ -67,7 +67,6 @@ export default function UIPlacesAutocomplete({ {({ getInputProps, getSuggestionItemProps, suggestions, loading }) => { if (!loading) { suggestionsRef.current = suggestions; - console.log(suggestions); } return (