From bed5c8dcedb2d36addd8f43cd520b7af7c3066ed Mon Sep 17 00:00:00 2001 From: dahoud Date: Mon, 13 Oct 2025 18:19:17 +0000 Subject: [PATCH] fix: Convert Date to ISO string in Facture state initialization --- app/(main)/factures/page.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/(main)/factures/page.tsx b/app/(main)/factures/page.tsx index fca2219..6a5103c 100644 --- a/app/(main)/factures/page.tsx +++ b/app/(main)/factures/page.tsx @@ -38,8 +38,8 @@ const FacturesPage = () => { const [facture, setFacture] = useState({ id: '', numero: '', - dateEmission: new Date(), - dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000), + dateEmission: new Date().toISOString(), + dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(), datePaiement: null, objet: '', description: '', @@ -113,8 +113,8 @@ const FacturesPage = () => { setFacture({ id: '', numero: '', - dateEmission: new Date(), - dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000), + dateEmission: new Date().toISOString(), + dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(), datePaiement: null, objet: '', description: '', @@ -220,8 +220,8 @@ const FacturesPage = () => { setFacture({ id: '', numero: '', - dateEmission: new Date(), - dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000), + dateEmission: new Date().toISOString(), + dateEcheance: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(), datePaiement: null, objet: '', description: '',