Categories | Question details Back To List | ||
dhtmlxscheduler - trouble with scheduler.setLoadMode("month"); When I set scheduler.setLoadMode("month"); it loads data for the current month fine, but when I click next or previous month it shows no data. It appears to be asking for the data for 2 months ahead instead of the next month. For example, in month view on initial load of the scheduler for the month of August it loads data for 2009-7-1 to 2009-10-1. When I click the next month button to go to September it requests data for 2009-10-1 to 2009-11-1. Since it gets no data for the month of September it displays no data. (though it is cached from the initial request, and will display it if I click back to August, then back to September again) Also, if no data for the month is found as described above the scheduler gives a javascript error "Error: this._colsS.heights is undefined" when I double click to add a new event. Answer posted by Support on Aug 28, 2009 01:45 >>When I set scheduler.setLoadMode("month"); it loads data for the current month fine, but when Problem with incorrect data auto-loading is fixed in latest build - please use the updated js file, it can be taken from next post http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=11205&ssr=yes&s=scheduler%20load >>Also, if no data for the month is found as described above the scheduler gives a javascript error The situation with an error can't be reconstructed locally. If it still occurs for you - please provide any kind of sample where problem can be reconstructed ( you can send it directly to support@dhtmlx.com ) Answer posted by Josh on Aug 28, 2009 10:58 The updated javascript file referenced in the answer above does not resolve the first issue for me. Behavior is exactly the same as I described with that version of the javascript. I think issue 2 may resolve itself once we are able to resolve issue 1. Is there a way to get it to load just the current month on initial load instead of the current month, previous month, and next month? Answer posted by Support on Aug 28, 2009 13:44 >> on initial load of the scheduler for the month of August it loads data for 2009-7-1 to 2009-10-1. >>When I click the next month button to go to September it requests data for 2009-10-1 to 2009-11-1 Technically it is correct, the first request already loaded data for september ( because its end date is the October 1 ) , so second requests fetch data to fill few days of October , which is visible in month view, all data for Septermber's events was loaded by first call. We will double-check it , but locally it works fine. The js error may appear only if some problem occurs during rendering, it can't be caused by absence of information. Answer posted by Josh on Aug 28, 2009 14:23 It does load the data for October when displaying September, which is ok. But when it does this it does not display the data already loaded for September. It appears to be an issue with not getting data from the cache if it is loading data when switching months. Example: initial load on August loads data for July - September click "next month" arrow loads data for October, displays no events for Sepetember click "next month" arrow again loads data for November, displays no events for October click "prev month" arrow loads no data, displays events for September Answer posted by Support on Aug 31, 2009 10:36 Please try to add the next line to the init code scheduler.attachEvent("onXLE",function(){ scheduler.render_view_data(); }); It will force data rendering after each data loading. Also, please be sure that each time when data loaded - it contains unique IDs for events. If events in different month ( during different loading calls ) are sharing the same ID value it will not add new events to the view ( which may be a reason of problems in your case ) Answer posted by Josh on Sep 03, 2009 07:38 Thanks, forcing data rendering has resolved the issue. |