How can I get the width in pixels between two dates without using the getTaskPositon metod?
10x in advance.
How can I get the width in pixels between two dates without using the getTaskPositon metod?
10x in advance.
Hi @Nikolai_Dimentiev,
You can calculate the pixel difference between dates, using the posFromDate(date)
method, which takes the date as a parameter, and returns the x-coordinate (in pixels) of the specified date in the timeline.
Here is a snippet:
http://snippet.dhtmlx.com/f891369dc
API:
https://docs.dhtmlx.com/gantt/api__gantt_posfromdate.html