temporary working eventcreator

This commit is contained in:
Michael Fatemi 2021-06-23 14:31:16 -04:00
parent b7244c91e5
commit 09fa99e89c
3 changed files with 9 additions and 3 deletions

View File

@ -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 (
<UISecondaryBox style={{ width: '100%', boxSizing: 'border-box' }}>

View File

@ -16,7 +16,13 @@ export default function UIDatetimeInput({
<input
style={baseStyle}
type="datetime-local"
onChange={(e) => onChangedDate(e.target.valueAsDate)}
onChange={(e) => {
const number = e.target.valueAsNumber;
if (!isNaN(number)) {
const date = new Date(number);
onChangedDate(date);
}
}}
/>
);
}

View File

@ -67,7 +67,6 @@ export default function UIPlacesAutocomplete({
{({ getInputProps, getSuggestionItemProps, suggestions, loading }) => {
if (!loading) {
suggestionsRef.current = suggestions;
console.log(suggestions);
}
return (
<div