Our state of the art Gantt chart


Post by surebhava »

Hi,
We want a feature in the Panel tbar where we have a datefield ,on selection the view port will be moved to that selected date value range and the tasks from that range will be shown .
Have added the logic we have used

 {
            type: "datefield",
            text: "Project start",
            style: "margin-right:15px",
            editable: false,
            width: "160px",
            step: "1d",
            required: true,
            value: "",
            listeners: {
              change: ({ value }) => {
              
gantt.startDate = DateHelper.add(value, -1, "week"); gantt.project.setStartDate(value); }, }, },

But when I change the date instead of viewport change the task start date is changed to selected date . Tried the same in the advanced example faced same errorhttps://bryntum.com/examples/gantt/advanced/.
how can I proceed ?


Post by alex.l »

That is correct behaviour.
project's startDate and timeAxis' startDate are not the same. The one you need to configure is only gantt.startDate.
https://bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#field-startDate
https://bryntum.com/docs/gantt/api/Gantt/view/Gantt#config-startDate

All the best,
Alex


Post by surebhava »

Thanks Alex


Post Reply