@@ -107,10 +107,9 @@ export default class Education extends ConsentComponent {
107
107
const fromDate = new Date ( newEducation . timePeriodFrom ) . setHours ( 0 , 0 , 0 , 0 ) ;
108
108
const toDate = new Date ( newEducation . timePeriodTo ) . setHours ( 0 , 0 , 0 , 0 ) ;
109
109
110
- if ( fromDate > currentDate // Start Date is in past or current
111
- || fromDate >= toDate // Start Date is before End Date
112
- || ( newEducation . graduated && toDate > currentDate ) ) { // End Date is in past or current
113
-
110
+ if ( fromDate > currentDate // Start Date is in past or current
111
+ || fromDate >= toDate // Start Date is before End Date
112
+ || ( newEducation . graduated && toDate > currentDate ) ) { // End Date is in past or current
114
113
invalid = true ;
115
114
}
116
115
}
@@ -326,11 +325,11 @@ export default class Education extends ConsentComponent {
326
325
newEducation [ e . target . name ] = e . target . value ;
327
326
} else {
328
327
newEducation [ e . target . name ] = e . target . checked ;
329
- if ( e . target . checked ) { // if gradated and toDate is in Future, nullify it
328
+ if ( e . target . checked ) { // if graduated and toDate is in Future, nullify it
330
329
const toDate = new Date ( newEducation . timePeriodTo ) . setHours ( 0 , 0 , 0 , 0 ) ;
331
330
const currentDate = new Date ( ) . setHours ( 0 , 0 , 0 , 0 ) ;
332
331
if ( toDate > currentDate ) {
333
- newEducation . timePeriodTo = ''
332
+ newEducation . timePeriodTo = '' ;
334
333
}
335
334
}
336
335
}
0 commit comments