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
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/components/_common/atoms/DateInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function DateInput({ label, innerText, ...props }: DateInputProps
ref={inputRef}
type="date"
{...props}
required
/>
</S.Wrapper>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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

}));
};

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() : '',
}));
};
Comment on lines 48 to 60
Copy link
Contributor

Choose a reason for hiding this comment

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

👍


Expand Down
Loading