Piotr Stulinski
Piotr Stulinski

Reputation: 9471

Example of Kendo UI Scheduler with Angular 2?

Does anyone have a kendo UI scheduler example with angular 2? Is it compatible?

Thanks

Upvotes: 1

Views: 1894

Answers (3)

Piotr Stulinski
Piotr Stulinski

Reputation: 9471

Since there is some interest in this still you can create a component that is wrapped by the scheduler:

import { Component, ViewEncapsulation, ElementRef, AfterViewInit, OnDestroy, DoCheck, Input, Output, EventEmitter, IterableDiffers } from '@angular/core';

//you can import Jquery here if you want - i used it via CDN and not local node.
declare var jQuery: any;


scheduler: any;
schedulerControl: any;


@Component({
    selector: 'scheduler',
    template: `
        <div></div>
    `,
    styleUrls: ['./scheduler.component.scss'],
    encapsulation: ViewEncapsulation.None
})

 constructor(
        protected el: ElementRef,

    ) {


    }
  //you can also do @input and @outputs here if you want to build proper events around the scheduler components.



 ngAfterViewInit() {
        this.scheduler = jQuery(this.el.nativeElement.children[0]);
        this.schedulerControl = jQuery(this.scheduler).data("kendoScheduler");

 this.scheduler.kendoScheduler({.....put your scheduler options here ....});

Note: You must import and use the right version of jquery - which is sadly still version 1.xxx Note 2: New versions now supports higher versions of Jquery - important to make sure they versions match with kendo requirements.

Upvotes: 3

sbenyo
sbenyo

Reputation: 21

We are currently working on a project that has a very complex scheduling module. At the momonet we are using Kendo UI scheduler wrapped with Angular2.

This is of course not a good solution as we are wrapping the Kendo JQuery implementation. It does work (and pretty well) but we will not continue with it if there will be no progress on native Angular2 implementation soon as it forces us to work "outside" Angular.

I think it's a shame that Telerik announcements on Angular2 are not clear enough. They put on their flag being leaders in Angular2 support long ago but it seems this is not happening as expected. We are already invested in Kendo in other projects(not Angular2) but we will have to choose something real soon.

If Kendo will not start showing any real progress we will not continue with it.

Upvotes: 1

Chase Oliphant
Chase Oliphant

Reputation: 389

It is likely that the Angular2 kendo scheduler widget will be released in 2017. Here is a link to their roll out plan.

http://www.telerik.com/blogs/what-to-expect-in-2016-for-kendo-ui-with-angular-2-and-more

In the meantime to use the scheduler our team has just imported angular 1.x for the page running our scheduler in our angular 2.x app. Not ideal but you can also get just the kendo scripts you need to run the scheduler if you're worried about performance.

You may also want to look at using ngForward with angular 1.x in the meantime until the angular 2.x widget is available. Then convert your entire application over to angular 2.x when kendo releases the scheduler.

Upvotes: 0

Related Questions