jQuery UI Widgets › Forums › Scheduler › Month View Exception
Tagged: exception, jquery scheduler, jqwidgets scheduler, month, scheduler, view
This topic contains 7 replies, has 4 voices, and was last updated by Peter Stoev 8 years, 5 months ago.
-
AuthorMonth View Exception Posts
-
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:
Thanks for your time.
Hi Goldstein,
Ok. You can send us jsfiddle.net example which demonstrates such behavior.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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.
DemoHi Goldstein,
We use JavaScript so customizing the native objects could break the things. I suggest you writing wrappers instead.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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.
Hi Beg,
I’m afraid that we do not think so. Custom objects are not supported.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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…
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 StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.