How to get date clicked in timeline


#1

I want to get the date clicked in the timeline, so I can use that date to set a field in my custom form.


#2

Hello,

Please note that there are different handlers in timeline view if you click on x scale or y scale and so on. If you want to get date when clicking simply on some cell in timeline view then unfortunately for now it’s not possible.
Such functionality will be added in the upcoming version.

Kind regards,
Ilya


#3

How do I get the y scale label?


#4

Hello,

At what moment?
You passed array of y scale options yourself, so you have access to it.

If you mean “onYScaleClick” then

scheduler.attachEvent("onYScaleClick", function (index, section, e){ where ‘section’ is you passed to create timeline view. So you can access label as section.label.

Kind regards,
Ilya


#5

Users wont be clicking on the y-axis. They will be clicking somewhere within the timeline, so I can to then grab the y-axis data and the x-axis date.


#6

I’ve also tried onCellClick, but not sure how to get the y axis data and the lightbox then doesn’t popup at all!


#7

Is there any improvement to get date from x-axis on click?