Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-fe: Date Picker 버그 수정 #676

Merged
merged 3 commits into from
Sep 20, 2024
Merged

fix-fe: Date Picker 버그 수정 #676

merged 3 commits into from
Sep 20, 2024

Conversation

github-actions[bot]
Copy link
Contributor

Original issue description

목적

Date Picker 버그 수정. 삭제 버튼을 눌렀을 경우 나타난 에러 픽스

작업 세부사항

  • [ ]

참고 사항

  • toISOString메서드를 Date 형식에 안맞게 사용하여 나타난 에러

아래의 별표줄 밑에 요구사항 ID만 작성해주세요. Prefix 금지!


FIX_DATE_PICKER

closes #675

@github-actions github-actions bot added fix 버그 수정 frontend 프론트엔드 labels Sep 20, 2024
Copy link
Contributor Author

1726809976.604899

Copy link
Contributor Author

1726809977.546799

Copy link
Contributor

@seongjinme seongjinme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

러기 빠른 수정에 감사드립니다. required 속성을 DateInput이 아니라 이걸 가져다 쓰는 쪽에서 부여했으면 좋겠다는 코멘트를 남기던 차에 이걸 미리 수정해 주셨네요 ㅋㅋ 수고하셨어요!

Comment on lines 48 to 60
const handleStartDate = (e: React.ChangeEvent<HTMLInputElement>) => {
setRecruitmentInfoState((prev) => ({
...prev,
startDate: new Date(e.target.value).toISOString(),
startDate: e.target.value ? new Date(e.target.value).toISOString() : '',
}));
};

const handleEndDate = (e: React.ChangeEvent<HTMLInputElement>) => {
setRecruitmentInfoState((prev) => ({
...prev,
endDate: new Date(e.target.value).toISOString(),
endDate: e.target.value ? new Date(e.target.value).toISOString() : '',
}));
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -48,14 +48,14 @@ export default function Recruitment({ recruitmentInfoState, setRecruitmentInfoSt
const handleStartDate = (e: React.ChangeEvent<HTMLInputElement>) => {
setRecruitmentInfoState((prev) => ({
...prev,
startDate: new Date(e.target.value).toISOString(),
startDate: e.target.value ? new Date(e.target.value).toISOString() : '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하~ 요놈이 문제였군요.

Copy link
Contributor

@llqqssttyy llqqssttyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빠른 픽스 감사합니다 러기~
value가 존재하지 않을 때 기본값을 빈 문자열로 지정해줘야 하는군요?
덕분에 배웠습니다.

@lurgi lurgi marked this pull request as ready for review September 20, 2024 07:47
Copy link
Contributor Author

1726818451.682619

@lurgi lurgi merged commit 658999c into fe/develop Sep 20, 2024
23 checks passed
@lurgi lurgi deleted the fe-675-FIX_DATE_PICKER branch September 20, 2024 07:50
llqqssttyy pushed a commit that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 버그 수정 frontend 프론트엔드
Projects
Status: 완료
Development

Successfully merging this pull request may close these issues.

3 participants