CalculateEndDate parameters

Hello,

As shown in the docs here the method gantt.calculateEndDate is taking only one param but in the example you are doing gantt.calculateEndDate(new Date(2013,02,15), 48);.

So I tried and the method is working as expected with two parameters while I am having an error.

image

here is a stackblitz showing the problem Angular (forked) - StackBlitz

Hello Ouassim,
Yes, you can specify 2 parameters and it should work correctly.
Looks like, you’ve encountered an issue with the missing types. We are aware of that, and it will be fixed in future versions. I cannot give you any ETA, but I will notify you when the issue is fixed.

If you find other missing types, please share them with me, and I will forward them to the dev team.

Hello Ouassim,
I would like to inform you that the dev team added more types in the 8.0 version:
https://docs.dhtmlx.com/gantt/whatsnew.html#x6629x80x6630x:~:text=Updated%20TypeScript%20type%20definitions
https://docs.dhtmlx.com/gantt/whatsnew.html#x6629x80x6630x:~:text=Type%20definitions%20are%20updated

Now there are types for the tasks, links, grid columns, scales, extensions, and almost everything in the others category:
https://docs.dhtmlx.com/gantt/desktop__task_properties.html
https://docs.dhtmlx.com/gantt/desktop__link_properties.html
https://docs.dhtmlx.com/gantt/api__gantt_columns_config.html
https://docs.dhtmlx.com/gantt/api__gantt_scales_config.html
https://docs.dhtmlx.com/gantt/api__gantt_ext_other.html
https://docs.dhtmlx.com/gantt/api__refs__gantt_others.html

You can update to the latest version to get more features and improvements, including the better Typescript Support.

However, even if you are using the older version and don’t have plans to upgrade, you can still use the updated version of the dhtmlxgantt.d.ts file as the Gantt API is mostly the same:

There are still ways to improve, so in the future versions, the dev team will add more types for Gantt.