I am trying to format the date in the popup on the map in ArcGIS for Javascript using the online documentation
Consider the following code:
const fieldInfo = new FieldInfo({
fieldName: "startDate",
format: new FieldInfoFormat({ dateFormat: "long-month-day-year" })
});
const popup = new PopupTemplate( {
content: "<p><b>Start Date:</b> {startDate} <b>End Date</b>: {endDate}<p>"
fieldInfos: [ fieldInfo ]
});
I can't seem to get the fieldInfos format to format the date. The date keeps coming out in the default format:

Any ideas to what is causing the issue?
for reference here are my dependencies:
"dependencies": {
"classlist.js": "^1.1.20150312",
"rxjs": "^6.5.5",
"tslib": "^1.13.0",
"web-animations-js": "^2.3.2",
"zone.js": "^0.10.3"
},
"devDependencies": {
"codelyzer": "^5.2.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "^5.4.4",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.7.5"
}