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, startTime,
endTime, endTime,
groupId, groupId,
placeId,
}), }),
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
}); });
}, [name, startTime, endTime, groupId]); }, [name, startTime, endTime, groupId, placeId]);
return ( return (
<UISecondaryBox style={{ width: '100%', boxSizing: 'border-box' }}> <UISecondaryBox style={{ width: '100%', boxSizing: 'border-box' }}>

View File

@ -16,7 +16,13 @@ export default function UIDatetimeInput({
<input <input
style={baseStyle} style={baseStyle}
type="datetime-local" 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 }) => { {({ getInputProps, getSuggestionItemProps, suggestions, loading }) => {
if (!loading) { if (!loading) {
suggestionsRef.current = suggestions; suggestionsRef.current = suggestions;
console.log(suggestions);
} }
return ( return (
<div <div