Premium support for our pure JavaScript UI components


Post by chrisb »

Hey Guys,

In the advanced demo https://www.bryntum.com/examples/gantt/advanced/, edit a task, set the duration to 1290 days, then try increase by another day, the end date rolls around to an earlier date.

Cheers,

Chris


Post by arcady »

There is a private config limiting calendar iterations longer than 5 years roughly. It's purpose is to stop infinite iteration in case of a calendar misconfiguration.
Here is a ticket to make it public: https://github.com/bryntum/support/issues/2962

And so far to override this value you can use the code like this:

// subclass standard CalendarModel class
class MyCalendarModel extends CalendarModel {

    // override its calendarCache property
    get calendarCache() {
        const result = super.calendarCache;

        // to change its maxRange to some custom 10 years value
        result.maxRange = 10 * 365 * 24 * 60 * 60 * 1000;

        return result;
    }

}

new Gantt({
    project : {
        // tell project model that we want to use custom calendar model class
        calendarModelClass : MyCalendarModel,
        ...

Related forum post where this topic was also discussed recently: viewtopic.php?f=52&t=17668


Post Reply