fix: Revert Date conversion for chantierData local state (expects Date not string)
This commit is contained in:
@@ -515,7 +515,7 @@ RECOMMANDATIONS:
|
||||
<Calendar
|
||||
id="dateDebut"
|
||||
value={chantierData.dateDebut}
|
||||
onChange={(e) => setChantierData(prev => ({ ...prev, dateDebut: e.value?.toISOString() || new Date().toISOString() }))}
|
||||
onChange={(e) => setChantierData(prev => ({ ...prev, dateDebut: e.value || new Date() }))}
|
||||
dateFormat="dd/mm/yy"
|
||||
showIcon
|
||||
/>
|
||||
@@ -526,7 +526,7 @@ RECOMMANDATIONS:
|
||||
<Calendar
|
||||
id="dateFinPrevue"
|
||||
value={chantierData.dateFinPrevue}
|
||||
onChange={(e) => setChantierData(prev => ({ ...prev, dateFinPrevue: e.value?.toISOString() || new Date().toISOString() }))}
|
||||
onChange={(e) => setChantierData(prev => ({ ...prev, dateFinPrevue: e.value || new Date() }))}
|
||||
dateFormat="dd/mm/yy"
|
||||
showIcon
|
||||
minDate={chantierData.dateDebut}
|
||||
|
||||
Reference in New Issue
Block a user