Full sample:
[code]
<script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="../../codebase/ext/dhtmlxscheduler_limit.js" type="text/javascript" charset="utf-8"></script>
<script src='../../codebase/ext/dhtmlxscheduler_timeline.js' type="text/javascript" charset="utf-8"></script>
<style media="screen">
html, body {
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
.red_section {
background-color: red;
opacity: 0.25;
filter:alpha(opacity=25);
}
.yellow_section {
background-color: #ffa749;
opacity: 0.25;
filter:alpha(opacity=25);
}
.green_section {
background-color: #12be00;
opacity: 0.25;
filter:alpha(opacity=25);
}
.blue_section {
background-color: #2babf5;
opacity: 0.27;
filter:alpha(opacity=27);
}
.pink_section {
background-color: #6a36a5;
opacity: 0.30;
filter:alpha(opacity=30);
}
.dark_blue_section {
background-color: #2ca5a9;
opacity: 0.40;
filter:alpha(opacity=40);
}
.dots_section {
background-image: url(data/imgs/dots.png);
}
.fat_lines_section {
background-image: url(data/imgs/fat_lines.png);
}
.medium_lines_section {
background-image: url(data/imgs/medium_lines.png);
}
.small_lines_section {
background-image: url(data/imgs/small_lines.png);
}
</style>
<script charset="utf-8">
function init() {
scheduler.config.multi_day = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.locale.labels.timeline_tab = "Timeline";
scheduler.locale.labels.section_custom="Section";
var sections=[
{key:1, label:"James Smith"},
{key:2, label:"John Williams"},
{key:3, label:"David Miller"},
{key:4, label:"Linda Brown"}
];
scheduler.createTimelineView({
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30,
x_size: 24,
x_start: 16,
x_length: 48,
y_unit: sections,
y_property: "section_id",
render:"bar"
});
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"custom", height:23, type:"select", options:sections, map_to:"section_id" },
{name:"time", height:72, type:"time", map_to:"auto"}
];
scheduler.addMarkedTimespan({days: new Date(2012,7,6), zones: [0,720,1080,1440], css: "red_section" });
//scheduler.addMarkedTimespan({start_date: new Date(2012,7,6,0), end_date: new Date(2012,7,6,15), css: "red_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,7), end_date: new Date(2012,7,8), css: "fat_lines_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,11), end_date: new Date(2012,7,12), css: "yellow_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,12), end_date: new Date(2012,7,13), css: "dots_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,13), end_date: new Date(2012,7,14), css: "green_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,14), end_date: new Date(2012,7,15), css: "medium_lines_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,18), end_date: new Date(2012,7,19), css: "blue_section" });
scheduler.addMarkedTimespan({start_date: new Date(2012,7,19), end_date: new Date(2012,7,20), css: "small_lines_section" });
scheduler.init('scheduler_here',new Date(2012,7,6),"week");
scheduler.addEvent({
start_date: new Date(2012,7,9,1),
end_date: new Date(2012,7,9,3),
text: "Navigate to the next week to check more examples"
});
}
</script>
[/code]
Original 3.5 version, blocks time correctly on timeline view.
Best regards,
Ilya