Skip to content

Commit

Permalink
fix: 스터디 신청 기간 날짜 겹치지 않도록 수정 (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 authored Sep 5, 2024
1 parent bd12241 commit 0623093
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@ const StudyStartDatePick = () => {
}
}, [handleStudyDateSelect, studyDate.fromValue, studyDate.toValue, week]);

const disableDateList = [
{
from: new Date(0),
to: yesterday,
},
...(watch("applicationEndDate")
? [
{
from: new Date(0),
to: studyApplyEndDate,
},
]
: []),
];

return (
<Flex direction="column" position="relative" width={358}>
<Text color="sub" style={{ marginBottom: "8px" }} typo="label2">
Expand Down Expand Up @@ -115,9 +100,12 @@ const StudyStartDatePick = () => {
{isOpen && (
<div ref={datepickerRef}>
<DayPicker
disabled={disableDateList}
mode="range"
weekStartsOn={1}
disabled={{
from: new Date(0),
to: yesterday,
}}
selected={{
from: formatStringToDate(studyDate.fromValue),
to: formatStringToDate(studyDate.toValue),
Expand Down

0 comments on commit 0623093

Please sign in to comment.