Skip to content

Commit

Permalink
Merge pull request #445 from LikeLion-at-DGU/dev
Browse files Browse the repository at this point in the history
🚀 Deploy
  • Loading branch information
sayyyho authored Aug 6, 2024
2 parents d292e54 + e45297d commit 032fc37
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/DateRangeCalendar/DateRangeCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ const DateRangeCalendar = forwardRef((ref) => {
const id = useRecoilValue(registerID);

const resetCalendar = () => {
setStartDate(null);
setEndDate(null);
setSelectedStartDate(null);
setSelectedEndDate(null);
};

useImperativeHandle(ref, () => ({
resetCalendar,
}));

const timeZone = "Asia/Seoul";
const getZonedDate = (date) => addHours(new Date(date), 9);

Expand Down Expand Up @@ -128,6 +124,7 @@ const DateRangeCalendar = forwardRef((ref) => {
setSelectedEndDate(selectedEndDate);
setIsCalendarVisible(false);
setIsCheckVisible(true);
resetCalendar();
setTimeout(() => {
if (window.location.href.includes("theme")) {
window.location.reload();
Expand Down

0 comments on commit 032fc37

Please sign in to comment.