Unworked hours setting

Hi team,
I use the timeline with day view.
I try to set unworked hours with this code in :

scheduler.createTimelineView
name: “timeline”,
first_hour: 7,
last_hour: 18,

and this code :
scheduler.ignore_timeline = function(date){
if (date.getHours() < 7 || date.getHours() > 18)
return true;
};

Unfortunatly the unworked hours still stay visible in timeline and day view.

My objective is to set worked hours as :
07:00 to 12:00 AM
13:00 to 18:00 PM

Is it possible with the last Scheduler version 5.1.6 ?

Hi,

Please check the snippet, ignore_timeline works as expected:
http://snippet.dhtmlx.com/90f2d2fd6

The same with Scheduler version 5.1.6:
https://docs.dhtmlx.com/scheduler/samples/11_scales/04_timeline_ignore.html

Hi Polina,
this is the snippet in the actaul status with the scheduler.ignore_timeline = function commented.
As you see my objective is to display 7 days with 2 columns per day: AM & PM
I try to set unworked hours to hide them in the lightbox when I create a new task.
Also to hide unworked hours in day and week view.

see: http://snippet.dhtmlx.com/5db680354

If you uncomment the scheduler.ignore_timeline the timeline don’t show what I try to set.

If you want to hide interval using the ignore_timeline, this interval can’t be a part of the scale step http://prntscr.com/nipv9l
In this case you need to set max step == 1 hour. Only the full cell on the Y-axis can be hidden.

I try to set unworked hours to hide them in the lightbox when I create a new task.

There are settings that can be used for first and last hour in the time select:

scheduler.config.first_hour, 
scheduler.config.last_hour.

Unfortunately, you can’t hide the hour in the middle of the range (like hour == 13)
limit_time_select is also required with configurations above.

Also to hide unworked hours in day and week view.

Day view and week view:
Same configurations, that used for the lightbox:

scheduler.config.first_hour
scheduler.config.last_hour

The hour in the middle of the range can’t be hidden, but you can block it
https://docs.dhtmlx.com/scheduler/limits.html

Additional for the week view to hide whole day:
https://docs.dhtmlx.com/scheduler/week_view.html#hidingdaysinthexaxisoftheview

Hi Polina,
Many thanks all it’s OK.