This is a migrated thread and some comments may be shown as answers.

kendo scheduler's 'this..intlService.weekendRange is not a function' error in angular

3 Answers 266 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
uawci
Top achievements
Rank 1
uawci asked on 27 Apr 2020, 06:26 AM

How to solve this. Is anybody know? Error I see is below.
Console error;

 

ng:///PersonLeaveModule/PersonLeaveCalendarNewComponent.ngfactory.js:7 ERROR TypeError: this.intlService.weekendRange is not a function at SchedulerComponent.get [as workWeek] (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2710) at SchedulerComponent.notifyOptionsChange (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2669) at SchedulerComponent.ngAfterContentInit (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2417) at callProviderLifecycles (webpack-internal:///../../../core/esm5/core.js:12915) at callElementProvidersLifecycles (webpack-internal:///../../../core/esm5/core.js:12889) at callLifecycleHooksChildrenFirst (webpack-internal:///../../../core/esm5/core.js:12872) at checkAndUpdateView (webpack-internal:///../../../core/esm5/core.js:14022) at callViewAction (webpack-internal:///../../../core/esm5/core.js:14369) at execComponentViewsAction (webpack-internal:///../../../core/esm5/core.js:14301) at checkAndUpdateView (webpack-internal:///../../../core/esm5/core.js:14024

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 28 Apr 2020, 02:36 PM

Hi Uawci,

Indeed the provided information is not enough for us to determine what exactly causes the reported error. A possible cause could be an old version of the Internationalization package or Scheduler package. Please update the kendo packages to the latest version in order to benefit from the latest bug fixes and features:

https://www.telerik.com/kendo-angular-ui/components/installation/up-to-date/

It is possible that npm has cached locally some packages including the above mentioned. Try clearing your npm cache, and removing your package-lock.json and node_modules folder and then explicitly running the following command:

  • npm i @progress/kendo-angular-scheduler@latest
  • npm i @progress/kendo-angular-intl@latest

Then restore the rest of your dependencies with:

  • npm i

In case the issue persists, could you provide a StackBlitz or runnable example that reproduces the error, so that we can inspect the code and try to find the root of the issue. Thank you in advance.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
uawci
Top achievements
Rank 1
answered on 04 May 2020, 02:20 PM

hello, thank you for your answer.  when i update the scheduler i get the following error;

 

ERROR in node_modules/@progress/kendo-angular-scheduler/dist/es2015/pdf/pdf-command.directive.d.ts(30,22): error TS2415: Class 'PDFCommandDirective' incorrectly extends base class 'ButtonDirective'.
  Types of property 'onClick' are incompatible.
    Type '(e: any) => void' is not assignable to type '() => void'.

 

due to this error, i have to downgrade the scheduler version.

0
Martin
Telerik team
answered on 06 May 2020, 05:12 AM

Hi Uawci,

Indeed, there was an issue caused by the latest version of the Buttons package that led to conflicting names when buttons are used within the Scheduler. We addressed it immediately and released in 1.1.2 version of the Scheduler package that contains the fix:

https://www.telerik.com/kendo-angular-ui/components/scheduler/changelog/#toc-bug-fixes

Upgrading to the latest Scheduler version should resolve the problem.

https://www.telerik.com/kendo-angular-ui-develop/components/installation/up-to-date/

Remove your package-lock.json and node_modules folder and then explicitly running the following command:

npm i @progress/kendo-angular-scheduler@latest

Then restore the rest of your dependencies with:

npm i

Let me know how it goes.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Scheduler
Asked by
uawci
Top achievements
Rank 1
Answers by
Martin
Telerik team
uawci
Top achievements
Rank 1
Share this question
or