Closed Messilimeng closed 11 months ago
Hello,
Gantt stores end dates in a 'not inclusive' format. Meaning that the end date of the task in your example will be stored as 2022-04-15 00:00
– midnight after April 14th. By default, these dates are displayed as is, so the user may get the impression that the task takes one extra day.
You can redefine the task_end_date
template to change the format of the end dates of tasks in the Gantt (i.e. to include the end date in the duration of the tasks):
https://docs.dhtmlx.com/gantt/api__gantt_task_end_date_template.html
For more details on formatting end dates, see the Task end date display & Inclusive end dates article:
https://docs.dhtmlx.com/gantt/desktop__loading.html#taskenddatedisplayampinclusiveenddates
Please check the example of how it might be implemented:
https://snippet.dhtmlx.com/5i3349k4
If you meant something different, please clarify your question.
@ArtiBorisevich thanks i did it , but i have another question how cancel the task beginning not move with project beginning
i dont want it moving together。
Hello,
If the parent task type is a project, you can change the task type of the project to task. There is an article about it:
https://docs.dhtmlx.com/gantt/desktop__task_types.html
If the parent task type is task, you need to check that start_date
, end_date
, duration
parameters are set correctly, in case if there are no parameters, the task can behave like a project.
Please check the example in the following snippet:
https://snippet.dhtmlx.com/p4yn7zgv ;
If it doesn't help you, please reproduce your issue in the snippet, click the "Save" button and send the link to us.
@ArtiBorisevich ok thanks ,So if I use project type ,need PRO edition ?
Hello, Yes, this functionality is available only in the PRO edition. You can check the list of features that are available in Standard and Pro versions of dhtmlxGantt: https://docs.dhtmlx.com/gantt/desktop__editions_comparison.html
why the end_date is 15 not 14