forked from Suneet25/zoomcar-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Suneet25#39 from Suneet25/fw20_1276_day5
Fw20 1276 day5
- Loading branch information
Showing
17 changed files
with
16,612 additions
and
12,009 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// import { Box, Button } from "@chakra-ui/react"; | ||
// import React, { useState } from "react"; | ||
// import { DateRangePicker } from "react-date-range"; | ||
// import { addDays } from "date-fns"; | ||
// import "react-date-range/dist/styles.css"; | ||
// import "react-date-range/dist/theme/default.css"; | ||
// import { useNavigate } from "react-router-dom"; | ||
|
||
// const DateTime = () => { | ||
// const navigate = useNavigate(); | ||
// const [state, setState] = useState([ | ||
// { | ||
// startDate: new Date(), | ||
// endDate: addDays(new Date(), 7), | ||
// key: "selection", | ||
// }, | ||
// ]); | ||
|
||
// const handleSelect = (date) => { | ||
// let startDate = String(state[0]?.startDate); | ||
// let endDate = String(state[0]?.endDate); | ||
// let stDate = ""; | ||
// let edDate = ""; | ||
// for (let i = 0; i < 16; i++) { | ||
// stDate += startDate[i]; | ||
// edDate += endDate[i]; | ||
// } | ||
// localStorage.setItem("firstDay", JSON.stringify(stDate)); | ||
// localStorage.setItem("lastDay", JSON.stringify(edDate)); | ||
|
||
// navigate("/"); | ||
// }; | ||
|
||
// return ( | ||
// <Box height={"100vh"} backgroundColor="white" color={"black"}> | ||
// <DateRangePicker | ||
// onChange={(item) => setState([item.selection])} | ||
// showSelectionPreview={true} | ||
// moveRangeOnFirstSelection={false} | ||
// months={2} | ||
// ranges={state} | ||
// direction="horizontal" | ||
// preventSnapRefocus={true} | ||
// calendarFocus="backwards" | ||
// /> | ||
// <Box> | ||
// <Button backgroundColor="#e0e0e0" onClick={() => handleSelect(state)}> | ||
// Done | ||
// </Button> | ||
// </Box> | ||
// </Box> | ||
// ); | ||
// }; | ||
|
||
// export default DateTime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.