Navigation next, previous month


I have a question about how I can load task of only month and after navigate for months.
I have to work for one year or two year for example so I can’t load all tasks and report in Gannt in one time…
So for example I have to display only the tasks of the current month and after I have to go to the previous month o next month and load the tasks.
The library have a plugin that add this range, the button ecc…for this example a sort of calendar or I have to implement the js code?

dhtmlxGantt have no built-in controls for switching the displayed date, you’ll have to implement it manually.
Here is the api for setting scale range from code … html#range

As for loading partial data - you can manually call gantt.load each time when you reset the scale and add min/max dates to url as parameters.
Then on a backend you’ll be able to select and return only the required tasks

I put two button prev e next and use jquery with onclick event.
But now I have a problem, how I can retrieve the object gannt, if I make


         var d = gantt.getState().min_date;

I have the error gannt undefined…So how can I make

I found the response that is