I've encountered an issue with the PrimeNG calendar component when using time in milliseconds
HTML
<p-calendar [(ngModel)]="task.startDate"
[minDate]="minDateValue"
[maxDate]="maxDateValue"
readonlyInput="readonlyInput"
[showIcon]="true">
</p-calendar>
TypeScript
"startDate":1490039621704,
Instead of working correctly, I'm getting this error message:
EXCEPTION: Uncaught (in promise): TypeError: date.getMonth is not a function
TypeError: date.getMonth is not a function
Is there a way to specify the date format for this component to handle the milliseconds properly?
Update
Based on the documentation here, it mentions that the date format for milliseconds should be @ - Unix timestamp (ms since 01/01/1970). I tried adding the attribute dateFormat="@ "
to the component but the issue persists.