jQuery UI Widgets Forums Scheduler Month View Exception

This topic contains 7 replies, has 4 voices, and was last updated by  Peter Stoev 8 years, 5 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Month View Exception #81093

    Goldstein
    Participant

    Hello

    I have set up a Scheduler fed by a Data Adapter as demonstrated below. Whilst in the Month view, if I navigate to any month containing one or more appointments an exception is thrown. Using any other view (Week, Day, Agenda) works fine.

    Some particulars:

    All properties of records sourced by the Data Adapter contain valid data (Ids are unique, nothing is ‘undefined’/null, date properties are successfully parsed to Date objects.)

    Occurred using both 3.9 and 4.0 (only versions tested).

    //source and data adapter
        var dataFields = [
            { name: 'Id', type: 'string' },
            { name: 'AllDay', type: 'bool' },
            { name: 'To', type: 'date', format: "yyyy-MM-dd HH:mm" },
            { name: 'From', type: 'date', format: "yyyy-MM-dd HH:mm" },
            { name: 'Subject', type: 'string' }
        ];
    
        this.dataSource = {
            datatype: "json",
            datafields: dataFields,
            root: 'data',
            id: 'Id',
            url: window.CALENDAR_EVENTS_URL,
            type: 'GET'
        };
    
    this.dataAdapter = new $.jqx.dataAdapter(this.dataSource);
    
    this.scheduler = $("#jqxScheduler").jqxScheduler(
        {
            width: "100%",
            height: 600,
            source: this.dataAdapter,
    
            appointmentDataFields: {
                id: "Id",
                allDay: "AllDay",
                from: "From",
                to: "To",
                subject: "Subject"
            },
    
            view: 'monthView',
            views: [
                { type: 'dayView' },
                { type: 'weekView' },
                { type: 'monthView' },
                { type: 'agendaView' }
            ]
        });
    

    Stack trace:
    Stack trace

    Thanks for your time.

    Month View Exception #81102

    Peter Stoev
    Keymaster

    Hi Goldstein,

    Ok. You can send us jsfiddle.net example which demonstrates such behavior.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Month View Exception #81644

    Goldstein
    Participant

    Eureka!

    Make of this what you will. Finally, as a last resort, I deleted all my code part-by-part until the scheduler worked again. After deleting the last extension function I had written for the Array class, all came right again.

    Here is the JSFiddle. It doesn’t matter what you name the function, any additions to the Array.prototype object caused the same problem.
    Demo

    Month View Exception #81654

    Peter Stoev
    Keymaster

    Hi Goldstein,

    We use JavaScript so customizing the native objects could break the things. I suggest you writing wrappers instead.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Month View Exception #81858

    Beg
    Participant

    Hi,
    I’ve encountered this problem as well, but I’m unable to fix it as suggested because I use this “Array.prototype.newFunction” often in my framework.
    While analyzing jQWidget code, I’ve found simple solution – there is already check while iterating arrays, but is it only “for(var a in b)if(a==”indexOf”)break;”. This should be replaced by “for(var a in b)if(typeof(a)==”function”)break;” (or typeof(a)==’object’ if you prefer)

    This fix is easy and should be part of jQWidget.

    Month View Exception #81862

    Peter Stoev
    Keymaster

    Hi Beg,

    I’m afraid that we do not think so. Custom objects are not supported.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Month View Exception #83268

    Juan
    Participant

    Why do I get this error in view of months

    TypeError: f is undefined

    …unction(i,h,f,e){var g=i.valueOf();var d=f.valueOf();var c=h.valueOf();var b=e.v…

    Month View Exception #83275

    Peter Stoev
    Keymaster

    Hi Juan,

    Send us a Scheduler example and step by step instructions how to reproduce it and may be we will be able to tell you.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.