Kendo Scheduler loading issues slot startdate and enddate are getting undefined

3 posts, 0 answers
  1. Anil
    Anil avatar
    4 posts
    Member since:
    Jun 2016

    Posted 21 Nov 2017 Link to this post


    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. Tyler
    Tyler avatar
    68 posts
    Member since:
    Feb 2017

    Posted 22 Nov 2017 in reply to Anil Link to this post

    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.

  3. Anil
    Anil avatar
    4 posts
    Member since:
    Jun 2016

    Posted 27 Nov 2017 Link to this post

    Hi 

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

Back to Top