Skip to content

Commit 0623093

Browse files
authored
fix: 스터디 신청 기간 날짜 겹치지 않도록 수정 (#134)
1 parent bd12241 commit 0623093

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

apps/admin/app/studies/create-study/_components/StudyBasicInformation/StudyStartDatePick.tsx

+4-16
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,6 @@ const StudyStartDatePick = () => {
6161
}
6262
}, [handleStudyDateSelect, studyDate.fromValue, studyDate.toValue, week]);
6363

64-
const disableDateList = [
65-
{
66-
from: new Date(0),
67-
to: yesterday,
68-
},
69-
...(watch("applicationEndDate")
70-
? [
71-
{
72-
from: new Date(0),
73-
to: studyApplyEndDate,
74-
},
75-
]
76-
: []),
77-
];
78-
7964
return (
8065
<Flex direction="column" position="relative" width={358}>
8166
<Text color="sub" style={{ marginBottom: "8px" }} typo="label2">
@@ -115,9 +100,12 @@ const StudyStartDatePick = () => {
115100
{isOpen && (
116101
<div ref={datepickerRef}>
117102
<DayPicker
118-
disabled={disableDateList}
119103
mode="range"
120104
weekStartsOn={1}
105+
disabled={{
106+
from: new Date(0),
107+
to: yesterday,
108+
}}
121109
selected={{
122110
from: formatStringToDate(studyDate.fromValue),
123111
to: formatStringToDate(studyDate.toValue),

0 commit comments

Comments
 (0)