Issue number in timeline bookings

Hello,
I have many bookings that fall in a certain period of time. How can I only spend the number of bookings? When crossing the number with the mouse, the tooltip is output.
https://docs.dhtmlx.com/scheduler/samples/06_timeline/01_slots.html
Similar to the example.
I do not understand how the example works.

Thank you
Ciao thomas

Hi,

To activate Cell mode of Timeline view, you should set (render: “cell”). It’s default value of ‘render’ property, so it is not specified in the sample.

scheduler.createTimelineView({
render: "cell",
...
})

If you also want to hide the tooltip, hide it by CSS

.dhx_year_tooltip{ display:none; }
Demo

Hi Polina,
that works very well. What is needed to book several bookings in one day?
I can make a booking, then the lightbox will not open anymore.

I deactivated that.

scheduler.attachEvent("onEventCollision", function (ev, evs) {
		for (var i = 0; i < evs.length; i++) {
			if (ev.room != evs[i].room) continue;
			dhtmlx.message({
				type: "error",
				text: "This room is already booked for this date."
			});
		}
		return true;
	});

Thank you

hmm… I’m not fully understand the question.
You deactivated opening of the lightbox and at the same time you want to create several events in one day. There is no way to create new event without opening the lightbox in Timeline view.
You can configure the maximum allowable number of events per time slot by collision_limit.
To avoid opening the lightbox, you can save the event like in this example. But you can’t use this way with yours when onEventCollision fires.

If this doesn’t help you to solve your problem, please provide with more information.

Hi Polina,
works very well. How can I deactivate the back button in the Timline above if the date was selected today?
the user is not allowed to go back in time. Today is always the start in the timeline. I do not know how to query today’s date and disable the back button.

THANK YOU
Ciao Thomas

Hi Thomas,

Check mode and date when onBeforeViewChange event fires and ‘return false’ according to your requirements.
docs.dhtmlx.com/scheduler/api__ … event.html

ok, I understood. And how do I determine the first date in the timeline? if it is the date of today?
Because only then the back button should be disabled.

If you mean how to determine start_date of initialization, just set newDate() into init method.

scheduler.init("scheduler_here",new Date(),"timeline");

To get today date in onBeforeViewChange event you shoul use the same way. As a result you should get
docs.dhtmlx.com/scheduler/snippet/a8cef795

Can I disable the back button like this? … it does not work that way …

document.getElementById('.dhx_cal_prev_button').style.display = 'none';

It does not work because ‘.dhx_cal_prev_button’ is not ID, it is a class.
Ypu shouls use

document.getElementsByClassName('dhx_cal_prev_button')[0].style.display = 'none';

docs.dhtmlx.com/scheduler/snippet/72ad31a3