Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unscheduled task show 1 day duration #126

Open
nikunjpatel99 opened this issue Oct 10, 2024 · 1 comment
Open

Unscheduled task show 1 day duration #126

nikunjpatel99 opened this issue Oct 10, 2024 · 1 comment

Comments

@nikunjpatel99
Copy link

  1. if i mark any task as unscheduled than it take 1 day as duration if the task is not unscheduled that way should show duration ?

  2. if i have only start date in that case lib take 1 day as duration and caculat enddate of that in that what if only want so the startdate.

so basically it is possible to show only start date of task ?

i have dhtmlx-gantt : "^8.0.10" inside my project

@nikunjpatel99 nikunjpatel99 changed the title Unscheduled show 1 day duration Unscheduled task show 1 day duration Oct 11, 2024
@gearcoded
Copy link

@nikunjpatel99,
Gantt expects that every task will have the date parameters (start_date, end_date, and duration).
When you load tasks without enough date parameters Gantt assigns them from their children or from other tasks. But in that case, you won't be able to drag or resize these tasks.
You can check how it works in the following sample:
https://snippet.dhtmlx.com/wpxeeiap

If a task is unscheduled, Gantt still adds the dates to the task object.
By default, the dates for these tasks are not displayed, but Gantt doesn't change that for the duration column:

https://snipboard.io/EpR1bj.jpg

If you don't want to show the duration for unscheduled tasks, you can use the template function in the column configuration and return an empty string:
https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#datamappingandtemplates

Here is an example:
https://snippet.dhtmlx.com/bzaiuo84

And you can use the same approach, if you want to show the start date for unscheduled tasks:
https://snippet.dhtmlx.com/hdwmha0y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants