Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed May 13, 2024
1 parent deb6cf1 commit efb979a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pages/board/calendar/create.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const CalendarCreatePage = () => {
const router = useRouter();

const [title, setTitle] = useState('');
const [start_date, setStartDate] = useState();
const [event_date, setEventDate] = useState();

const dDay = moment(event_date).diff(moment(), 'days');

const handleSubmit = async () => {
const body = {
title: title,
start_date: start_date,
event_date: event_date,
};

PoPoAxios.post('/calendar', body, { withCredentials: true })
Expand Down Expand Up @@ -48,9 +48,9 @@ const CalendarCreatePage = () => {
<div className={'required field'}>
<label>시작 날짜</label>
<ReactDatePicker
selected={start_date ? moment(start_date).toDate() : null}
selected={event_date ? moment(event_date).toDate() : null}
onChange={(date) =>
setStartDate(moment(date).format('YYYY-MM-DD'))
setEventDate(moment(date).format('YYYY-MM-DD'))
}
onKeyDown={(e) => e.preventDefault()}
dateFormat="yyyy-MM-dd"
Expand Down

0 comments on commit efb979a

Please sign in to comment.