Our pure JavaScript Scheduler component


Post by Srb »

I'm trying to implements this feature to manage the breakTimes, I cant found the way to include the example on my code.

It shows that error...

Value of type 'typeof RecurringTimeSpan' is not callable. Did you mean to include 'new'?
//Define a new Model extending TimeSpan class
// with RecurringTimeSpan mixin which adds recurrence support
class MyTimeRange extends RecurringTimeSpan(TimeSpan) {}

// Define a new store extending the Store class
// with RecurringTimeSpansMixin mixin to add recurrence support to the store.
// This store will contain time ranges.
class MyTimeRangeStore extends RecurringTimeSpansMixin(Store) {
    static get defaultConfig() {
        return {
            // use our new MyTimeRange model
            modelClass : MyTimeRange,
            storeId    : 'timeRanges'
        };
    }
}

instantiate store for time ranges using our new classes
const myTimeRangeStore = new MyTimeRangeStore();

Thank's in advance


Post by saki »

It is a shortcoming in our typings that we will fix. The ticket is here https://github.com/bryntum/support/issues/3621

Please ignore it till fixed:

// @ts-ignore
class MyTimeRange extends RecurringTimeSpan(TimeSpan) {}

// @ts-ignore
class MyTimeRangeStore extends RecurringTimeSpansMixin(Store) {
    static get defaultConfig() {
        return {
            // use our new MyTimeRange model
            modelClass : MyTimeRange,
            storeId    : 'timeRanges'
        };
    }
}

Post by Srb »

Hello Saki,

That's erase the error but doen't work, I'll be waiting the ticket resolution.

Thanks!


Post by saki »

That's strange, I expected it to work. Can you please post a showcase that I could run, investigate and debug? If there's any other problem it has to be resolved too.


Post Reply