From 07d898e3c881b7631e7dd31998b0769e4544d3af Mon Sep 17 00:00:00 2001 From: M Fikri A Date: Tue, 16 Nov 2021 06:05:02 +0700 Subject: [PATCH] Enable Clear Date Input --- .../Settings/Profile/Education/index.jsx | 13 +++++++------ .../Settings/Profile/Education/styles.scss | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/shared/components/Settings/Profile/Education/index.jsx b/src/shared/components/Settings/Profile/Education/index.jsx index ffc9d7cecb..7df00f3408 100644 --- a/src/shared/components/Settings/Profile/Education/index.jsx +++ b/src/shared/components/Settings/Profile/Education/index.jsx @@ -181,12 +181,10 @@ export default class Education extends ConsentComponent { } onUpdateDate(date, timePeriod) { - if (date) { - const { newEducation: oldEducation } = this.state; - const newEducation = { ...oldEducation }; - newEducation[timePeriod] = date; - this.setState({ newEducation, isSubmit: false }); - } + const { newEducation: oldEducation } = this.state; + const newEducation = { ...oldEducation }; + newEducation[timePeriod] = date || ''; + this.setState({ newEducation, isSubmit: false }); } /** @@ -530,6 +528,7 @@ export default class Education extends ConsentComponent {