Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object: Comparing Dates causes Loading stuck

matthancock
Contributor III

When trying to compare dates ie date1 - date2. The page gets stuck on loading. Is there a better way?

Code

$('div[id^="' + statusStartdateId + '"]').change(function () {

var startDate = new Date($CM.getFieldValue(startdateId));
var dueDate = new Date($('#master_DefaultContent_rts_s3855_f23395c').text());

var diff = dueDate- startDate;

alert(diff);

});

matthancock_0-1673449469984.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

DavidPetty
Archer Employee
Archer Employee

@matthancock typically a JavaScript error is being thrown.  Check the browser developer tools console to see what's being thrown.

 Advisory Consultant

View solution in original post

2 REPLIES 2

DavidPetty
Archer Employee
Archer Employee

@matthancock typically a JavaScript error is being thrown.  Check the browser developer tools console to see what's being thrown.

 Advisory Consultant

Thanks David - I believe it is from having the calc in the load instead of an outer function.