for (var index in infoWindowData) { if (!infoWindowData[index].AttributeValue.ActualReInspectionDate == '') { infoWindowData[index].AttributeValue.ActualReInspectionDate == showNullValueAs; } else{ var date = new js.date(); }
for (var index in infoWindowData) { var tr = document.createElement("tr"); tbody.appendChild(tr); switch (infoWindowData[index].DataType) { case "string": CreateTableRow(tr, infoWindowData[index].DisplayText, dojo.string.substitute(infoWindowData[index].AttributeValue, attributes)); break; case "date": // Extract the desired date field from the list of attributes. If the date is not available, the date field is an empty string var dateField = dojo.string.substitute(infoWindowData[index].AttributeValue, attributes); var dateString = showNullValueAs; if (dateField.length > 0) { var utcMilliseconds = Number(dateField); dateString = dojo.date.locale.format(date.utcToLocal(date.utcTimestampFromMs(utcMilliseconds)), { datePattern: formatDateAs, selector: "date" }); } CreateTableRow(tr, infoWindowData[index].DisplayText, dateString); break; } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.