kendo.parseDate fails across frame boundaries.

2 posts, 0 answers
  1. Andrés
    Andrés avatar
    37 posts
    Member since:
    Jun 2011

    Posted 08 May 2013 Link to this post

    Hi,
    I've been fighting this issue all day, trying to make sense of it and why would the first check the function does fails:
                if (value instanceof Date) {
                    return value;
                }

    It turns out that when you're passing around information across frames (iframe), the instanceof does not recognize it as a date anymore (but it is). So the function goes on to assume it's a string and tries to call value.indexOf(...) and that of course fails because it's not a string.

    After some investigation I ran across a solution to this, and that would be to change this initial check from what it was to:
                if (Object.prototype.toString.call(value) === '[object Date]') {
                    return value;
                }

    I tested it in my environment and it works. I'm attaching a test case so you can verify. Hope you can fix this soon, be it with my suggestion or by any other means.
    Thanks a lot!
    Andrés
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 10 May 2013 Link to this post

    Hello,

     
    Here is a quote of my answer to the ticket opened on the same subject:

    Thank you for contacting us and for providing a solution for the described issue. Unfortunately, even if we incorporate the suggested solution, we still cannot guarantee that Kendo UI will work. We use instaceofacross our code for checks like value instanceof kendo.data.ObservableObject, which will not work in this case. What I can suggest you is to modify the source code of the Kendo UI manually In order to add support for these scenarios. Note that we can not provide support for modified Kendo UI.

    I will ask you continue our conversation in only one thread in order to avoid any duplications

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top