diff --git a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts index d7d0fe5..ba52853 100644 --- a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts +++ b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts @@ -35,7 +35,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent nextDate():Date { let temporalItemLayer = this.itemLayer as ITemporalItemLayer; if(temporalItemLayer.nextItemLayer.item) - return temporalItemLayer.nextItemLayer.item.dataDate; + return new Date(Date.parse(temporalItemLayer.nextItemLayer.item.dataDate)) ; return null; } @@ -47,7 +47,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent previousDate():Date { let temporalItemLayer = this.itemLayer as ITemporalItemLayer; if(temporalItemLayer.previousItemLayer.item) - return temporalItemLayer.previousItemLayer.item.dataDate; + return new Date(Date.parse(temporalItemLayer.previousItemLayer.item.dataDate)); return null; } @@ -74,7 +74,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent } handleGoToChart(item: IItem) { - this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, item.dataDate.getUTCFullYear()]); + this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]); return false; } }