Regarding to regular timeRanges, please check if you have any timeRanges specified in your server response. If so, they will be used instead of those that you set in your configs.
But anyway, we need to wait until this bug is fixed. Thank you for your question and sorry for inconvenience.
This is how it works to me in our react taskeditor examples:
<BryntumGantt
[.....]
timeRangesFeature="true"
timeRanges={[
{
"id" : 1,
"startDate": "2019-01-20", // <--- make sure you have correct date
"duration" : 1,
"durationUnit" : "d"
}
]}
Hey Alex, Thank you for spending time and helping me out.
I can confirm that this definitely works to show only once on the Gantt view.Even if I add recurrenceRule: 'FREQ=WEEKLY;BYDAY=SA', then also it's the same result. The time range is visible only once as I had shared in the previous screenshots.
After it will be fixed, we will be needed to add some code to make it works, but only after the bug will be fixed:
import { RecurringTimeSpan, RecurringTimeSpansMixin } from 'bryntum-gantt';
// 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'
};
}
}
[....]
const timeRangeStore = new MyTimeRangeStore({
data : [{
"id" : 1,
"startDate": "2019-01-20",
"duration" : 1,
"durationUnit" : "d"
}]
});
return (
<BryntumGantt
timeRangesFeature={{ store : timeRangeStore }}
After it will be fixed, we will be needed to add some code to make it works, but only after the bug will be fixed:
import { RecurringTimeSpan, RecurringTimeSpansMixin } from 'bryntum-gantt';
// 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'
};
}
}
[....]
const timeRangeStore = new MyTimeRangeStore({
data : [{
"id" : 1,
"startDate": "2019-01-20",
"duration" : 1,
"durationUnit" : "d"
}]
});
return (
<BryntumGantt
timeRangesFeature={{ store : timeRangeStore }}
I was also trying this from the example and the imports didn't work. Thought that is an incorrect way. It would be nice if this bug can be prioritised so we can start using the imports for custom time range store.