Premium support for our pure JavaScript UI components


Post by dominicdolan »

in what version is gantt.features.taskNonWorkingTime available?
i am using version 5.3.1 and i can access gantt.features.nonWorkingTime to disable it but i get undefined when trying to enable gantt.features.taskNonWorkingTime

i want my gantt chart to show the calenders assigned to each individual task


Post by mats »

It was added in Version 5.2.0 (see changelog here https://bryntum.com/products/gantt/changelog/). Have you imported the feature?


Post by dominicdolan »

yea as far as im aware im importing the feature,
iv tried to use it multiple ways and none seem to work
my tasks have calenders and the gantt just wont fill in for the tasks calendars only fills in for the project calendar (that i can turn off via gantt.features.nonWorkingTime.disabled)
like so:

this.gantt.features.taskNonWorkingTime = true;
this.gantt.features.taskNonWorkingTime.disabled = false;

//in the gantt config
get features() {
        return {
            nonWorkingTime: {
                disabled: false
            }
        }
    }

taken from examples shown from these 2 places
https://www.bryntum.com/products/gantt/examples/calendars/
https://www.bryntum.com/products/gantt/docs/api/Gantt/feature/TaskNonWorkingTime


Post by mats »

Any chance you can share a small test case with us with data?


Post by dominicdolan »

Task:
{
    "id": 228840,
    "parentIndex": 0,
    "readOnly": false,
    "startDate": "2023-09-19T09:00:00+01:00",
    "endDate": "2023-10-09T17:00:00+01:00",
    "duration": 15,
    "durationUnit": "day",
    "name": "Design",
    "calendar": 1,
    "direction": "Forward",
    "manuallyScheduled": false, 
    "percentDone": 0,
    "effortUnit": "hour",
    "segments": null,    
"schedulingMode": "Normal",
"frozenMilestoneMarker": { "id": "_generatedTimeSpan_57aeec02-4b56-4bc6-aed0-84d14220980d", "startDate": "2023-09-19T00:00:00+01:00", "endDate": "2023-10-26T00:00:00+01:00", "duration": 37, "durationUnit": "d", "cls": "event-marker-span event-marker-span-228840 ", "style": "--start-label: 'Design Start'; --end-label: 'Design Finish';", "name": "Design"
},
"sequence": 0, "hierarchies": [], "isParent": true, "children": [] }
calendars:
[
    {
        "id": 1,
        "name": "4 Day WW",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Monday, Tuesday, Wednesday, Thursday at 9:00",
                "recurrentEndDate": "on Monday, Tuesday, Wednesday, Thursday at 17:00",
                "isWorking": true
            }
        ]
    },
    {
        "id": 2,
        "name": "5 Day WW (M-F)",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Monday, Tuesday, Wednesday, Thursday, Friday at 9:00",
                "recurrentEndDate": "on Monday, Tuesday, Wednesday, Thursday, Friday at 17:00",
                "isWorking": true
            }
        ]
    },
    {
        "id": 3,
        "name": "5 Day WW (S-T)",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday at 9:00",
                "recurrentEndDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday at 17:00",
                "isWorking": true
            }
        ]
    },
    {
        "id": 4,
        "name": "6 Day WW (Sat)",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Monday, Tuesday, Wednesday, Thursday, Friday, Saturday at 9:00",
                "recurrentEndDate": "on Monday, Tuesday, Wednesday, Thursday, Friday, Saturday at 17:00",
                "isWorking": true
            }
        ]
    },
    {
        "id": 5,
        "name": "6 Day WW (Sun)",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday at 9:00",
                "recurrentEndDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday at 17:00",
                "isWorking": true
            }
        ]
    },
    {
        "id": 6,
        "name": "7 Day WW",
        "unspecifiedTimeIsWorking": false,
        "intervals": [
            {
                "recurrentStartDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday at 9:00",
                "recurrentEndDate": "on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday at 17:00",
                "isWorking": true
            }
        ]
    }
]



Post by dominicdolan »

using version 5.3.1


Post by tasnim »

Hi,

I do not see any issue applying this. It is working fine here. Have you tried with the latest version?
You can check if you can reproduce it here https://codepen.io/dv-auntik/pen/qBwrYEK?editors=0010 by adding your own data.
If you see any issues in the code pen please share the steps to reproduce it.

Best of luck :),
Tasnim


Post Reply