Our state of the art Gantt chart


Post by accounts@projul.com »

Hi, I have used the non working days feature on gantt. Just to show that specified days are non working. But user can still schedule tasks and those should be shown properly as they show on working days. Our requirement is just to highlight those days differently which are non working. In the attached screenshot you can see my tasks are showing as diamond like symbols on non working days but showing correctly on working days. I am using calendar feature and using recurring intervals to specify the non working days.
Please suggest how I can achieve the desired behavior?
This problem is not on the bryntum scheduler controls, we are showing the non working days on scheduler as well and events just show fine on non-working days as well. using this code

LocaleManager .locale.DateHelper.nonWorkingDays = days;
LocaleManager.applyLocale((LocaleManager as any).locale.localeName, true);

But the same thing is not working for bryntum gantt. That is why we have used the calendar non-working days feature.

Attachments
events showing fine on non-working days. Desired behavior. Need same behavior on  project gantt as well
events showing fine on non-working days. Desired behavior. Need same behavior on project gantt as well
scheduler_nonworkingday.png (112.54 KiB) Viewed 373 times
Events not showing properly on non working days
Events not showing properly on non working days
gantt_issue.png (110.2 KiB) Viewed 373 times

Post by accounts@projul.com »

Without non working days feature, all events are showing fine

Attachments
gantt_without_nonworkingdays.png
gantt_without_nonworkingdays.png (116.84 KiB) Viewed 371 times

Post by marcio »

Hey accounts@projul.com,

Actually, the Gantt configuration is expected to not work, as you'll see here https://bryntum.com/products/gantt/docs/api/Core/helper/DateHelper#property-nonWorkingDays-static

That nonWorkingDays is a readOnly property, which means that you can't assign some value to it.

You can check the example available here https://bryntum.com/products/gantt/docs/api/Scheduler/feature/NonWorkingTime to make it work as you mentioned to allow the user to schedule an event in the non-working time.

Attachments
Screenshot 2022-11-30 at 13.34.43.png
Screenshot 2022-11-30 at 13.34.43.png (24.3 KiB) Viewed 363 times

Best regards,
Márcio


Post by accounts@projul.com »

Hi marcio, can you mention how I can specify the non-working days using this example? as nonworking days are configurable in our application
https://bryntum.com/products/gantt/docs/api/Scheduler/feature/NonWorkingTime


Post by marcio »

Hey, you can update the locale file like this to update the nonworking days

// Make Tuesday and Wednesday non-working days
LocaleManager.extendLocale('En', {
            DateHelper : Object.assign({}, DateHelperLocale, {
                nonWorkingDays : {
                    2 : true,
                    3 : true
                }
            })
        });

    LocaleManager.applyLocale('En');

https://bryntum.com/products/gantt/docs/api/Core/localization/LocaleManager
https://bryntum.com/products/gantt/docs/guide/Gantt/customization/localization

Best regards,
Márcio


Post by accounts@projul.com »

NonWorkingTime feature of my gantt object is set to true, also nonWorkingDays property set correctly for LocaleManager.locale.DateHelper but still gant scheduler not showing those columns as non-working days.
Can you check what i am doing wrong? reffering to this post viewtopic.php?f=52&t=17651 it's mentioned gantt does not use the LocalManager. Please advised

Attachments
Screenshot 2022-11-30 165025.png
Screenshot 2022-11-30 165025.png (154.49 KiB) Viewed 358 times

Post by accounts@projul.com »

Above workaround didn't work. But able to achieve the desired behavior using multiple calendars. Thanks for the support


Post by marcio »

Glad that worked :) Please if you have other questions don't hesitate in contact us.

Best regards,
Márcio


Post Reply