ignore_timeline week/hour view

I’m trying to show a week long timeline, hiding everything before 12 and after 2pm each day. This code doesn’t work. Please help.

		scheduler.ignore_timeline_week = function(date){
			if (date.getHours() < 12 || date.getHours() > 14) return true;
		};

				
			scheduler.createTimelineView({
					name: "timeline_week", 
					dx: 100, 
					x_unit: 'hour',
					x_date: "%j %M",
					x_step: 24,
					x_size:  7,
					x_start: 0,
					x_length:  7,
					y_unit: resources,
					y_property:"unit",
					render: "bar",
					event_dy:"full",
					resize_events:true,
					second_scale: { 
							x_unit: 'week', 
							x_date: scheduler.locale.labels.week_of + " %j %M" 
					}
				});	

Hello,

Looks like it is occurs because you have set incorrect values of
x_step: 24,
x_size: 7,
x_start: 0,
x_length: 7

Please, check the snippet, it should help:
docs.dhtmlx.com/scheduler/snippet/9ddd0f4e

I can get it working like that, but then I have a line between every hour. I’d like to only have a line between each day.

In fact, I’d like it to look like the example in your documentation here:
docs.dhtmlx.com/scheduler/timeli … eviewcells


Thanks

Ken

Hello,

You can make it by using {timelineName}_cell_class template:
docs.dhtmlx.com/scheduler/api__s … plate.html

See example:
docs.dhtmlx.com/scheduler/snippet/1a01fba5

For some reason, even in your example snippet above, if you create an event that occurs off-hours (at times not shown in the timeline), the event appears during the next morning.