File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
modules/candidate_parameters/jsx Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -158,22 +158,29 @@ class ConsentStatus extends Component {
158158 let consentWithdrawal = consentStatus + '_withdrawal' ;
159159 let consentWithdrawal2 = consentStatus + '_withdrawal2' ;
160160
161- date1 = myFormData [ consentWithdrawal ] ?
161+ const withdrawDate1 = myFormData [ consentWithdrawal ] ?
162162 myFormData [ consentWithdrawal ] : null ;
163- date2 = myFormData [ consentWithdrawal2 ] ?
163+ const withdrawDate2 = myFormData [ consentWithdrawal2 ] ?
164164 myFormData [ consentWithdrawal2 ] : null ;
165165
166- if ( date1 !== date2 ) {
166+ if ( withdrawDate1 !== withdrawDate2 ) {
167167 alert ( label + ' withdrawal dates do not match!' ) ;
168168 return ;
169169 }
170- if ( date1 > today ) {
170+ if ( withdrawDate1 > today ) {
171171 alert (
172172 label
173173 + ' withdrawal date cannot be later than today!'
174174 ) ;
175175 return ;
176176 }
177+ if ( withdrawDate1 < date1 ) {
178+ alert (
179+ label
180+ + ' withdrawal date cannot be earlier than response date!'
181+ ) ;
182+ return ;
183+ }
177184 }
178185 }
179186 // Set form data
You can’t perform that action at this time.
0 commit comments