mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
temporary working eventcreator
This commit is contained in:
parent
b7244c91e5
commit
09fa99e89c
|
@ -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' }}>
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user