Select to view content in your preferred language

JS API 4.17 - Opening popup with actions

4745
1
Jump to solution
10-14-2020 12:26 PM
MKY
by
Emerging Contributor

JS API version 4.17:

Opening popup with actions, returns Error - error loading popupTemplate for graphic. 

error: RangeError:Invalid time value

This also happens on the sample code: Custom popup actions per feature attribute | Sample | ArcGIS API for
JavaScript 4.17

ArcGIS API for JavaScript Sandbox 

0 Kudos
1 Solution

Accepted Solutions
HeatherGonzago
Esri Contributor

Hi Markos,

Thanks for letting us know. Looking into it now and will let you know ASAP.

Ok, so the problem is attributed to the date fields. It happens when there's a date fieldInfo specified at the popupTemplate level and rendered within the popup. Even though we don't have any date fields specified in the fields fieldInfos configuration for the popup's content, it still reads the fields specified in the layer and by default displays the editor tracking information, ie. PopupTemplate.lastEditInfoEnabled.

Once I removed the layer's outFields and set the lastEditInfoEnabled property to false, the sample runs fine.

We created a fix for it and it will be added to the next release. 

-Heather

View solution in original post

1 Reply
HeatherGonzago
Esri Contributor

Hi Markos,

Thanks for letting us know. Looking into it now and will let you know ASAP.

Ok, so the problem is attributed to the date fields. It happens when there's a date fieldInfo specified at the popupTemplate level and rendered within the popup. Even though we don't have any date fields specified in the fields fieldInfos configuration for the popup's content, it still reads the fields specified in the layer and by default displays the editor tracking information, ie. PopupTemplate.lastEditInfoEnabled.

Once I removed the layer's outFields and set the lastEditInfoEnabled property to false, the sample runs fine.

We created a fix for it and it will be added to the next release. 

-Heather