@@ -181,12 +181,10 @@ export default class Education extends ConsentComponent {
181181 }
182182
183183 onUpdateDate ( date , timePeriod ) {
184- if ( date ) {
185- const { newEducation : oldEducation } = this . state ;
186- const newEducation = { ...oldEducation } ;
187- newEducation [ timePeriod ] = date ;
188- this . setState ( { newEducation, isSubmit : false } ) ;
189- }
184+ const { newEducation : oldEducation } = this . state ;
185+ const newEducation = { ...oldEducation } ;
186+ newEducation [ timePeriod ] = date || '' ;
187+ this . setState ( { newEducation, isSubmit : false } ) ;
190188 }
191189
192190 /**
@@ -530,6 +528,7 @@ export default class Education extends ConsentComponent {
530528 < div styleName = "field col-2" >
531529 < DatePicker
532530 readOnly
531+ showClearDate
533532 numberOfMonths = { 1 }
534533 isOutsideRange = { moment ( ) . subtract ( 1 , 'd' ) }
535534 date = { newEducation . timePeriodFrom }
@@ -559,6 +558,7 @@ export default class Education extends ConsentComponent {
559558 newEducation . graduated ? (
560559 < DatePicker
561560 readOnly
561+ showClearDate
562562 numberOfMonths = { 1 }
563563 isOutsideRange = { moment ( ) . subtract ( 1 , 'd' ) }
564564 date = { newEducation . timePeriodTo }
@@ -569,6 +569,7 @@ export default class Education extends ConsentComponent {
569569 ) : (
570570 < DatePicker
571571 readOnly
572+ showClearDate
572573 numberOfMonths = { 1 }
573574 date = { newEducation . timePeriodTo }
574575 id = "date-to1"
0 commit comments