Skip to content

Commit

Permalink
Update UserForm.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
EuJinnLucaShow committed Oct 1, 2023
1 parent 036ad53 commit 5d4e243
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/UserForm/UserForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { parseISO } from 'date-fns';
import { useDispatch, useSelector } from 'react-redux';
import { Formik, Field, Form } from 'formik';
import * as Yup from 'yup';
import DatePicker from 'react-datepicker';
import 'react-datepicker/dist/react-datepicker.css';

import StyledDatepicker from '../Datepicker/StyledDatepicker';
import RadioOption from '../RadioOption/RadioOption';
Expand Down Expand Up @@ -145,7 +143,7 @@ const UserForm = () => {
<Field type="number" name="desiredWeight" as={InputField} />
</div>

<Field name="birthday">
{/* <Field name="birthday">
{({ field, form }) => (
<DatePicker
selected={field.value}
Expand All @@ -157,13 +155,12 @@ const UserForm = () => {
customInput={<InputField />}
/>
)}
</Field>
</Field> */}

<StyledDatepicker
selectedDate={formik.values.birthday}
setSelectedDate={date => formik.setFieldValue('birthday', date)}
/>

</WrapperInputField>

<WrapperRadio>
Expand Down

0 comments on commit 5d4e243

Please sign in to comment.