Can you help me please,
i have a problem i have two date type list : listDate: Date[] = []; and listTotalDateProcEnCours: Date[] = [];
I want to insert listDate in the ather list: listTotalDateProcEnCours.
This is my code :
this.dossiers.forEach((element: any) => {
const listselected: any[] = [];
const listProcEnCours: any[] = [];
const listCommentaire: any[] = [];
**const listDate: Date[] = [];**
element.porteuseProcedureEnCours.forEach((e: any) => {
listProcEnCours.push(e.procedureEnCours)
if (e.reponse === true) {
// console.log('true', e.procedureEnCours)
listselected.push(e.procedureEnCours)
if (e.commentaire != null) {
listCommentaire.push(e.commentaire)
}
if (e.date != null) {
listDate.push(e.date);
}
}
});
**this.listTotalDateProcEnCours.push(listDate);**
When i tried to do that the compiler gives me this error:
Argument of type 'Date[]' is not assignable to parameter of type 'Date'. Type 'Date[]' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more.
Can you help me solve this problem, i want to insert date list into another date type list ?