How to pass only the date to the database (without passing the time) using react-datetime picker.
Currently in my code it will pass both date and time to the backend like this (2021-09-07T18:30:00.000Z).
I want to pass only the date like (2021-09-07) without the time. using react-datetime picker
please help me!
<ReactDatetime
inputProps={{
placeholder: "MM/DD/YY",
}}
dateFormat="DD/MM/YYYY"
timeFormat={false}
onChange={(value) =>
formik.handleChange({
target: {
name: "date_of_the_event",
value,
},
})
}
onBlur={formik.handleBlur}
value={formik.values.date_of_the_event}
/>