Dear Telerik Team.
I try to access a schedulerview's table and its resources to redefine the slot background colors. Unfortunately there are two properties missing to do that in typescript.
In Javascript
let
view = scheduler.view();
view.table.find(
"td[role=gridcell]"
).each(
function
() { ... });
let resources = view.resources;
works. In Typescript VS2015 shows me two errors. One at "table" anbd one at "resources".
Can you please update the definitions file? Maybe in a not too far future? :)
Thanks in advance
Bernd
5 Answers, 1 is accepted
To change the slot colours of the Kendo UI Scheduler, use the SchedulerView Interface slotTemplate property. A demo from the Kendo UI Scheduler How To documentation section is available at:
http://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/set-slot-background-color-using-slot-templates
The Kendo UI typescript files are mostly automatically generated by the properties, fields, methods and events and their adjoining event data etc. as documented in the widgets public API. Currently, we are not planning to extend it to access DOM elements or other properties accessible via JavaScript inheritance not part of the documented public API, however, you could edit the file yourself with the desired definitions.
Finally, if you discover a property, method, event, etc which is documented in the public API but not present in the typescript file, please let me know and I will make sure it is added as soon as possible.
Regards,
Alex
Telerik by Progress

Hello Alex.
Thank you for pointing me to the howto-documentation. That's a way to get rid of the "table" erro.
Maybe there is a publicly supported / typescript way to get the schedulers resources? In my scenario I have different timeframes with different colors for each resource.
Thanks in advance
Bernd


Hello Alex.
ATM I try to find a workaround to my problem. Doing that I might have found a mistake in the kendo typescript definitions
The SchedulerView contains two properties. startTime and endTime. In JS they both are funtions. Changing your defintion to the following makes my typescript work.
interface
SchedulerView {
allDayEventTemplate?:
string
|Function;
allDaySlot?: boolean;
allDaySlotTemplate?:
string
|Function;
columnWidth?: number;
dateHeaderTemplate?:
string
|Function;
dayTemplate?:
string
|Function;
editable?: boolean|SchedulerViewEditable;
endTime(): Date;
eventHeight?: number;
eventTemplate?:
string
|Function;
eventTimeTemplate?:
string
|Function;
group?: SchedulerViewGroup;
majorTick?: number;
majorTimeHeaderTemplate?:
string
|Function;
minorTickCount?: number;
minorTimeHeaderTemplate?:
string
|Function;
selected?: boolean;
selectedDateFormat?:
string
;
showWorkHours?: boolean;
slotTemplate?:
string
|Function;
startTime(): Date;
title?:
string
;
type?:
string
;
workWeekStart?: number;
workWeekEnd?: number;
}
Please check if I am right or tell my how I convince typescript to accept a conversion to at UTC string.
Thanks
BerndPlease accept my apology for the delay in responding.
You are correct in your observation that the Kendo UI Scheduler endTime and startTime definitions are incorrect. I will make sure they are fixed as soon as possible. As a token of gratitude for helping us improve, I have updated your Telerik points.
Regarding the second question - I have modified our AngularJS Scheduler demo to include a service to illustrate how you can use the demo from our previous communication. There are a couple of things that should be stressed in this scenario:
1) Ensure that synchronous operations are used
2) Performance issues may arise if large requests need processing
Please let me know if I am missing something - the demo is available at:
http://dojo.telerik.com/UvEmuR
Regards,
Alex
Telerik by Progress