Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2023-01-11 10:06 AM
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);
});
2023-01-11 10:39 AM
@matthancock typically a JavaScript error is being thrown. Check the browser developer tools console to see what's being thrown.
Advisory Consultant
2023-01-11 10:39 AM
@matthancock typically a JavaScript error is being thrown. Check the browser developer tools console to see what's being thrown.
Advisory Consultant
2023-01-11 10:41 AM
Thanks David - I believe it is from having the calc in the load instead of an outer function.