@@ -181,12 +181,10 @@ export default class Education extends ConsentComponent {
181
181
}
182
182
183
183
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 } ) ;
190
188
}
191
189
192
190
/**
@@ -530,6 +528,7 @@ export default class Education extends ConsentComponent {
530
528
< div styleName = "field col-2" >
531
529
< DatePicker
532
530
readOnly
531
+ showClearDate
533
532
numberOfMonths = { 1 }
534
533
isOutsideRange = { moment ( ) . subtract ( 1 , 'd' ) }
535
534
date = { newEducation . timePeriodFrom }
@@ -559,6 +558,7 @@ export default class Education extends ConsentComponent {
559
558
newEducation . graduated ? (
560
559
< DatePicker
561
560
readOnly
561
+ showClearDate
562
562
numberOfMonths = { 1 }
563
563
isOutsideRange = { moment ( ) . subtract ( 1 , 'd' ) }
564
564
date = { newEducation . timePeriodTo }
@@ -569,6 +569,7 @@ export default class Education extends ConsentComponent {
569
569
) : (
570
570
< DatePicker
571
571
readOnly
572
+ showClearDate
572
573
numberOfMonths = { 1 }
573
574
date = { newEducation . timePeriodTo }
574
575
id = "date-to1"
0 commit comments