I have two controls (chart and scheduler) on the same page. They both work fine except for the scheduler blocked times. I am using timeline view. The code for addMarkedTimespan is below. The blocked times are showing correctly on my scheduler but I am able to drag events into the blocked area (as seen in the attached screenshot. I have the limit JavaScript file before the scheduler. I am using zones and not dates to specify the blocked times because the start/end parameters for addMarkedTimespan do not appear to accept times (another item for the feature list). Please let me know if you have any ideas. Thanks
//==========================================================
// Timeline Configuration
//==========================================================
scheduler.locale.labels.timeline_tab = "Timeline"
scheduler.locale.labels.day_tab = "Group"
scheduler.config.xml_date = "%n/%j/%Y %H:%i";
scheduler.config.drag_resize = false;
scheduler.config.drag_create = false;
scheduler.config.details_on_create = false;
scheduler.config.details_on_dblclick = false;
scheduler.createTimelineView({
section_autoheight: false,
name: "timeline",
x_unit: "hour",
x_date: "%H",
x_step: 1,
x_size: 34,
x_start: -5,
x_length: 34,
y_unit: eval(results[0]),
y_property: "section_id",
render: "tree",
folder_events_available: false, // Make true when you want to show the supplier breakdown
dy: 20
});
var scheduler_id = $('[id$=MyTimeline]').attr("id");
scheduler.init(scheduler_id, new Date("01/01/1900"), "timeline");
scheduler.parse(eval(results[1]), "json");
var route_ranges = eval(results[2]);
for (var x = 0; x < route_ranges.length; x++) {
scheduler.addMarkedTimespan({
days: 0,
zones: eval(route_ranges[x].zone),
sections: { timeline: route_ranges[x].key },
type: "dhx_time_block"
});
}
scheduler.updateView();
// The following sample is for the route marked in the screen shot
// results[0] = <the data for the tree returned from my jQuery ajax call to the database>
// results[1] = <the data for events returned from my jQuery ajax call to the database>
// results[2] = <the data for blocked times returned from my jQuery ajax call to the database>
// route_ranges[x].zone = "[0, 545, 1545, 2040]"
// route_ranges[x].key = <the key from the timeline data sections>
Hello,
Issue with limit extension and timeline/tree view has been confirmed. Looks like limitation fails when timeline has x_unut:‘hour’ and x_start is specified(seems working correctly with commented x_start)
We are currently investigating this bug, I’ll post a hotfix here as soon as it will be ready
I see that a beta for version 3.7 has been posted. Was there ever a hot patch to fix the blocked timespan issue?
Hi,
the bug has been fixed just recently. It turned out that timeline renders blocks incorrectly when x_start specified.
Try using the attached version of the limit extension, it should fix the issue
dhtmlxscheduler_limit.zip (7.04 KB)
The fix was unsuccessful. Replacing the limit file returned the error in the attached screen shot. For a side note, I am using the latest jQuery 1.9.1 version, jQuery UI 1.10.1 and jQuery Migrate 1.1.1. I am not sure if these would play any factor in the functionality of the dhtmlx control.
Updated file depends on some other changes in in other scheduler’s files, sorry for inconvenience.
You can grab the beta package from here to test the fix
viewtopic.php?f=6&t=28499
or wait few more days, for official 3.7 release
I grabbed the latest beta code for all the js files in my project. The limit feature does not error and properly handles the dropped routes. However the addMarkedTimespan zones are functioning differently. In the old code, zero was the beginning of the scheduler timeline visible range. For example, my scheduler shows a 19:00 from day 1 to 05:00 on day 3. To cover the end with a proper limit from 20:00 - 6:00 every day I would use a zone as follows: [100, 660, 1500, 2040]. This was working properly. With the new code, the zones appear to be functioning as intended with zero being the start of a day (00:00). This would mean that my zone, in the above example, would be [0, 360, 1200, 1440] and repeat for a full week using the days option. When I set these options the scheduler starts out printing the zones but fails to repeat for a full week. Here are screen shots and the code used to print the timespan.
NOTE: The following code is coming from a jQuery ajax call which generates the JSON from my SQL Server database. I hard coded the range to [0, 360, 1200, 1440] for every route just to test the display of timespans in the screenshots.
var route_ranges = eval(data.d.BlockedTimes);
for (var x = 0; x < route_ranges.length; x++) {
scheduler.addMarkedTimespan({
days: "fullweek",
zones: eval(route_ranges[x].zone),
sections: { timeline: route_ranges[x].key },
type: "dhx_time_block"
});
}
scheduler.updateView();

Hello,
This is expected behavior. Zones should start from a day start in order to define the same time period in all views.
Please try the updated version of the limit extension, it should be fixed now
dhtmlxscheduler_limit_130220.zip (7.04 KB)
Any idea when this code will be worked into 3.7? I tried downloading the final release code and the zones are displaying incorrectly and not working. The files you provided above work great.
Was problem resolved after applying the above fix ?
Just doublechecked, and package for 3.7 contains the same updates.
It was applied after the fixes you provided but when I download the 3.7 code the other day and just copied over the new js files it did not appear to be fixed. The files sizes of the patch you sent don’t match the ones in the download either.
Hi,
can you attach an example showing the bug?
I’ve just checked standard package from the site, it seems working. dhtmlxscheduler_limit.js in sources/ext folder have the same size as the attachment from my previous post(actually the sizes aren’t exactly same, file from the package contains several lines of license info, thats the only difference)
I was unable to re-produce the issue. I must have forgotten to copy one of the 5 js files I need for my scheduler. However, I did figure out why the file sizes do not match. The codebase folder contains compressed versions of the javascript files while the sources folder contains the original uncompressed versions. I was confused because normally a compressed/minified javascript file contains a .min. somewhere in the naming but these did not. The only thing in versions 3.7 I have found which needs to be corrected is the !important css tag needs to be added to the .dhx_in_move in the terrace css file. Without the important tag the background color is not applied when the events are being moved.