From 8e54b1d572044735badcb38ddf59cc7f4ae714cc Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Mon, 16 Dec 2024 03:45:08 +0300 Subject: [PATCH] fix: fix date not being parsed --- src/pages/EditAdvertPage/EditAdvertPage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/EditAdvertPage/EditAdvertPage.ts b/src/pages/EditAdvertPage/EditAdvertPage.ts index c07afca1..21bb8e44 100644 --- a/src/pages/EditAdvertPage/EditAdvertPage.ts +++ b/src/pages/EditAdvertPage/EditAdvertPage.ts @@ -163,7 +163,7 @@ export default class EditAdvertPage { name: 'dateFrom', type: 'date', value: data - ? data.adDateFrom + ? data.adDateFrom.slice(0, 10) : new Date().toISOString().slice(0, 10), }, { @@ -171,7 +171,7 @@ export default class EditAdvertPage { name: 'dateTo', type: 'date', value: data - ? data.adDateTo + ? data.adDateTo.slice(0, 10) : new Date().toISOString().slice(0, 10), }, {