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

Kendo Scheduler loading issues slot startdate and enddate are getting undefined

2 Answers 396 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Anil
Top achievements
Rank 1
Anil asked on 21 Nov 2017, 12:14 PM

Hi,

 I am using kendo scheduler and am getting slots startdate and End Date are showing undefined error while initially loading the dialog.

After loading the page if I click the slots then I am getting that startdate undefined error.

After clicking the k-i-refresh icon the scheduler then it's working correctly.

I need to know why after clicking the k-i-refresh icon it's working and I need to do in initial itself

 

this is my code,

this.$('#cheduler').kendoScheduler({
dateHeaderTemplate: "<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd')#</span>",
majorTimeHeaderTemplate: kendo.template("<strong>#=kendo.toString(date,'h tt')#</strong>"),
slotTemplate: "<div style='background:white;'></div>",
workDayStart: new Date("2013/1/1 12:00 AM"),
workDayEnd: new Date("2013/1/1 11:59 PM"),
majorTick: 60, // a major tick represents 60 minutes (1 hours)
minorTickCount: 1, // a minor tick count represents the slots in the major tick
allDaySlot: false,
selectable: false,
editable: false,
header: false,
footer: false,
views: [
{
type: 'week',
selected: true,
workWeekStart: 6,
currentTimeMarker: false
}
],
dataSource: [
],
dataBinding: function (e) {
var tables = self.$(".employeeAvailablitycalendar .k-scheduler-times .k-scheduler-table");
tables = tables.first();
var rows = tables.find("th");
if (!isSelectable) rows.addClass("whiteboxshading");
else rows.addClass("greyboxshading");
},
dataBound: function (e) {
thisView.schedulerLayout(this)
thisView.readSchedules(this)
}
});

// to hide the Header tool...
this.getScheduler().wrapper.children("div").hide();

I don't want the header tool part to show and I need the slot startdate and enddate on initial dialog loading itself.

 

2 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 22 Nov 2017, 03:12 PM

I was not able to reproduce this issue... 

Here is a dojo with your code, but thisView.schedulerLayout(this) and thisView.readSchedules(this) were commented out, as I do not know what thisView is, or how schedulerLayout and readSchedules is working...

And when clicking on the scheduler, nothing happens, no error, nothing.

If you are able to modify that dojo to reproduce your issue, that would be helpful.

0
Anil
Top achievements
Rank 1
answered on 27 Nov 2017, 10:08 AM

Hi 

Thanks for the reply I have found the solution by refresh the scheduler after the page loading 

Tags
Scheduler
Asked by
Anil
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
Anil
Top achievements
Rank 1
Share this question
or