Comparing Actual end date and Planned end date

Vinutha BJ
Tera Contributor

I'm trying to compare to dates in change request form but it's not going inside if loop

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
return;
}

var actualEnd = g_form.getValue('work_end');
 var plannedEnd = g_form.getValue('end_date');

if ((actualEnd >= plannedEnd)) {
g_form.addErrorMessage('Actual end should be lesser than or equal to Planned end date ');
 g_form.clearMessages('actualEnd');
}

VinuthaBJ_1-1689927328220.png

 

 

 

0 REPLIES 0