Focus and Select Scheduler slot programmatically

10 posts, 0 answers
  1. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 25 Nov 2014 Link to this post

    I have multiple scheduler components and only one can be active at a time,
    When a scheduler is switch and "right-click"/context-menu is triggered on a slot in a newly switched scheduler, an error message occur: "Unable to get property 'getFullYear' of undefined or null reference" - in kendo.all.min.js

    This message will pop up on IE and trigger an error message in the console on Google Chrome,
    So far the error doesn't have any impact in general, just an annoying error message,

    Apparently, it won't trigger any error if "left-click" is triggered first on a slot in a newly switched scheduler before the "context-menu", and I realized that the "left-click" will give a focus and select a slot on a current scheduler. But the focus won't be given automatically by simply switching the scheduler,
    I switch the scheduler only by clicking a button that will set the display of a div to 'block' and zindex to '100' and then refresh the scheduler with .refresh(). The div has scheduler inside of it.
    So in general, the switching looks like this:
    var calendar1=document.getElementById("div1").firstChild;
    var calendar2=document.getElementById("div2").firstChild;
    $("#btn1").click(function(){
       $("#div2").css("display","none").css("z-index","-1");
       $("#div1").css("display","block").css("z-index","100");
       $(calendar1).data("kendoScheduler").refresh();
    });
    $("#btn2").click(function(){
       $("#div1").css("display","none").css("z-index","-1");
       $("#div2").css("display","block").css("z-index","100");
       $(calendar2).data("kendoScheduler").refresh();
    });

    When the switching occur, the scheduler won't switch the focus, how can I select a slot on a newly switched scheduler or at least give a focus to the newly switched scheduler?
    Because focus() method will not select a slot and it will still trigger the error
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 27 Nov 2014 Link to this post

    Hello,

    The described issue is not a known problem. Could you provide more details and if possible runnable demo that demonstrates the problem ? This will help us to investigate further the case and follow you up with more details.


    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 27 Nov 2014 in reply to Georgi Krustev Link to this post

    Thank you for your response,

    here is a simple demo that represents the error:
    Demo

    if you click on button "see schedule 2" then it will switch to schedule number 2, 
    and then if you right-click on the scheduler afterwards, then you will get the "getFullYear" error on the console,

    However, I managed to switch focus by adding the .refresh() functionality so it can remember the last focus and select that slot,but if you've never left-click or give focus onto the scheduler before, then it won't select any slot

  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 28 Nov 2014 Link to this post

    Hello,

    Thank you for the repro demo. It seems that this is bug related to our initial focusing behavior. I have logged the issue in our product backlog and will address is for the next service pack of Kendo UI.

    As a gratitude for your involvement I updated your Telerik points.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 31 Aug 2015 Link to this post

    Was this bug ever fixed?  I am using Kendo version v2015.2.624 and I keep running into this error.  I'm using the Kendo Scheduler in timeline view, and when a user clicks on a timeslot, I automatically create an event in that timeslot.  The issue is that about 1 in every 3 or 4 times I run the application, I get this same "Unable to get property 'getFullYear' of undefined or null reference" error, but only when clicking on certain timeslots.  I can't seem to find any pattern as to when or why some of the slots give this error when clicked, whereas the majority of the others all work fine.  Attached is the error and place in the Kendo code that the error is thrown.
  6. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2203 posts

    Posted 02 Sep 2015 Link to this post

    Hello Scott,

    The previously reported issue is already fixed on our side (as seen in this demo) - that why I would ask you to provide runable example where the issue is reproduced inside the other support thread that you opened?

    Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 02 Sep 2015 in reply to Vladimir Iliev Link to this post

    What demo are you referring to?  Your link simply links back to this forum post.
  8. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2203 posts

    Posted 03 Sep 2015 Link to this post

    Hello Scott,

    Please check the working link below:

    Regards,
    Vladimir Iliev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Dakshi
    Dakshi avatar
    1 posts
    Member since:
    Feb 2020

    Posted 10 Feb Link to this post

    Hi Vladimir Iliev,

     I am also facing same Cannot read property 'getFullYear' of undefined Issue.

    and i tried to open link given by you http://dojo.telerik.com/UTepi is not opening saying "There is a problem with the page. Please reload the page." ...

  10. Martin
    Admin
    Martin avatar
    224 posts

    Posted 12 Feb Link to this post

    Hello Dakshi,

    You will find my reply in the support thread you opened on the subject. I suggest to continue the communication there.

    Regards,
    Martin
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top