From 83a988b2cd58c5bb93e1a04197b1788cab55353d Mon Sep 17 00:00:00 2001 From: Achyuth Mohan Date: Fri, 2 Dec 2022 22:16:27 +0530 Subject: [PATCH] date added --- src/pages/PlaceDetailPage/BookingComponent.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/PlaceDetailPage/BookingComponent.js b/src/pages/PlaceDetailPage/BookingComponent.js index 342ffad..5ec2458 100644 --- a/src/pages/PlaceDetailPage/BookingComponent.js +++ b/src/pages/PlaceDetailPage/BookingComponent.js @@ -13,6 +13,7 @@ const BookingComponent = ({placeName,placeImage,stayId, placeid,setStayId,travel const[travelName,setTravelName]=useState() const[travelImage,setTravelImage]=useState() const [open, setOpen] = React.useState(false); + const[date,setDate]=useState() const handleClickOpen = () => { setOpen(true); @@ -31,7 +32,7 @@ const BookingComponent = ({placeName,placeImage,stayId, placeid,setStayId,travel const finalSubmit=()=>{ axiosInstance.post(`${baseUrl}/bookings/`, { - date_to_book: "2022-11-11", + date_to_book: date, place_name: placeName, place_image: placeImage, stay_name: stayName, @@ -113,7 +114,6 @@ useEffect(()=>{ - {/* */} ) } @@ -121,7 +121,7 @@ useEffect(()=>{ else if(state===2){ return(
- + {setDate(e.target.value)}} />