I am trying to create temporary task bar to overlap other task on hover or click.
The challenge we have is to find out the width of the duration/endDate.
We use gantt.posFromDate(new Date()), but how can we find the width according to
it’s endDate?
Thank you for tip. I have ordinary task, but want to create a dummy task box that retrieve optional date values and show as separate bar. Do I need to create a task object each time I hover or click ordinary task, then create optional “dummy” task, for then to delete same? Am not sure how to accomplish this.
Hello,
The getTaskPosition method requires the task object to get the vertical and horizontal position of the sizes. And anyway, you will need to draw a dummy task bar in the timeline, isn’t it? So, you can choose a task row and use the task object from that row. Otherwise, you just need to take the first task in the chart, if you only need horizontal sizes.