Hello,
I'm finding issues working with the DateTimePicker Component, I can't get the value inserted, here is my code :
import React, {useEffect, useState} from 'react';
import { DateTimePickerComponent } from '@syncfusion/ej2-react-calendars';
import './formulaireDisponibilites.css';
const FormulaireDisponibilites = () => {
const [datetime, setDatetime] = useState([]);
const minDatetime = new Date();
const handleChange = (event) => {
console.log('value changed');
console.log(event.value);
setDatetime(event.value);
console.log(datetime)
}
return (
<div>
<form>
<DateTimePickerComponent
placeholder="Indiquez la date et l'heure"
id="datetimepicker"
min={minDatetime}
format="dd-MM-yy HH:mm"
change={handleChange()}
step={30}
/>;
</form>
</div>
);
}
export default FormulaireDisponibilites;I get this error : 'Uncaught TypeError: Cannot read properties of undefined (reading 'value')' saying that the problem comes from the event.value
Do you know how I can solve this ?
Thank you