fix: Convert Date to ISO string in Facture state initialization
This commit is contained in:
@@ -38,8 +38,8 @@ const FacturesPage = () => {
|
||||
const [facture, setFacture] = useState<Facture>({
|
||||
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: '',
|
||||
|
||||
Reference in New Issue
Block a user