Compile Error: Class ZonedDate incorrectly implements interface Date

0 Answers 27 Views
Date Math
Mark
Top achievements
Rank 1
Iron
Mark asked on 07 Mar 2025, 01:11 PM

I'm receiving the following error using v18.0.1

Error: ../node_modules/@progress/kendo-date-math/dist/npm/tz/zoned-date.d.ts:38:22 - error TS2420: Class 'ZonedDate' incorrectly implements interface 'Date'. Type 'ZonedDate' is missing the following properties from type 'Date': MonthNames, MonthNamesShort, DayNames, DayNamesShort, and 27 more.

Here is my package.json:

{
  "name": "workbench",
  "version": "2.7.9",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --configuration development",
    "build": "ng build",
    "build-prod": "ng build --configuration production --output-hashing=all --source-map=false",
    "build:ssr": "ng run WebApplication1:server:dev",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^18.0.0",
    "@angular/cdk": "^18.0.0",
    "@angular/common": "^18.0.0",
    "@angular/compiler": "^18.0.0",
    "@angular/core": "^18.0.0",
    "@angular/forms": "^18.0.0",
    "@angular/material": "^18.0.0",
    "@angular/platform-browser": "^18.0.0",
    "@angular/platform-browser-dynamic": "^18.0.0",
    "@angular/router": "^18.0.0",
    "@ngx-formly/core": "^6.3.7",
    "@ngx-formly/material": "^6.3.7",
    "@ngx-formly/schematics": "^6.3.7",
    "@progress/kendo-angular-grid": "^18.1.0",
    "@progress/kendo-angular-layout": "^18.1.0",
    "@progress/kendo-licensing": "^1.4.0",
    "@progress/kendo-theme-material": "^10.2.0",
    "ag-grid-angular": "^32.2.1",
    "ag-grid-community": "^32.2.1",
    "bootstrap": "^5.3.3",
    "jquery": "3.7.1",
    "material-design-icons": "^3.0.1",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.14.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^18.0.1",
    "@angular/cli": "^18.0.1",
    "@angular/compiler-cli": "^18.0.0",
    "@angular/localize": "^18.2.6",
    "@types/jasmine": "~5.1.4",
    "jasmine-core": "~5.3.0",
    "karma": "~6.4.4",
    "karma-coverage": "~2.2.1",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.4.2"
  }
}

I tried deleting package.lock.json and running npm i to no avail. If I remove the implementation of Date for ZonedDate, it compiles but I don't have the ability to update the node_modules files in the CI/CD pipeline.

Any ideas would be appreciated. Thank you

Georgi
Telerik team
commented on 12 Mar 2025, 10:20 AM

Hi Mark,

Thank you very much for the details provided.

From what I understand from your question, you are currently trying to utilize the built-in Kendo UI Date Math package but are experiencing issues when trying to use the built-in ZonedDate class that the package exposes. Please, let me know if I misinterpreted the query.

Based on the information provided in the thread so far, I tried to replicate the error message that you are getting on your side when trying to use the ZonedDate class in the application on your side.

However, from what I have noticed, it seems like I might be missing out on some of the reproduction steps since no error is thrown on my side when using this class in an Angular application. For your reference, I am attaching to this response the Angular project where I performed the testing. To run the app:

  1. Download and unzip the folder.
  2. Execute npm install.
  3. Run ng serve.

Since I want to avoid misunderstandings and provide the maximum utility out of the support service, I would ask you to provide more detailed information about the project configuration or, ideally, send a small runnable example demonstrating the discrepancy(please, consider sending an application as a private support ticket in order for the code to remain confidential). This would allow me to reproduce the issue on my side, debug it, and thus come up with a more suitable suggestion.

I am looking forward to your reply.

Regards,
Georgi
Progress Telerik

 

No answers yet. Maybe you can help?

Tags
Date Math
Asked by
Mark
Top achievements
Rank 1
Iron
Share this question
or