Skip to content

Commit

Permalink
#29 fix: calendar 년, 월은 선택가능하게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leejin-rho committed Jul 2, 2024
1 parent 0c65367 commit f55edbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/challenge/ChallengeCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default function ChallengeCalendar({
setClickedDate(clickedDate);
};

const disableAllDates = ({ date }) => {
return true;
const disableDates = ({ date, view }) => {
return view === "month";
};

const customTileContent = ({ date, view }: { date: Date; view: string }) => {
Expand Down Expand Up @@ -58,7 +58,7 @@ export default function ChallengeCalendar({
prev2Label={null}
minDate={new Date(2024, 4, 1)}
tileContent={customTileContent}
tileDisabled={disableAllDates}
tileDisabled={disableDates}
/>
</StyledCalendarWrapper>
</div>
Expand Down

0 comments on commit f55edbc

Please sign in to comment.