Hi all.
Just wondering whether it is possible to change a SchedulingModePicker
's selected item programmatically.
We currently have the following TaskEditor
on our Gantt
:
taskEdit: {
items: {
advancedTab: {
items: {
schedulingModeField: {
allowedModes: 'Normal,FixedDuration',
listeners: {
change: ({ value, oldValue }) => {
const effortDrivenCheckbox = source.nextSibling.input;
if (value === 'Normal' && oldValue === 'FixedDuration') {
effortDrivenCheckbox.checked = false;
} else if (value === 'FixedDuration' && oldValue === 'Normal') {
effortDrivenCheckbox.checked = true;
}
}
}
},
effortDrivenField: {
listeners: {
change: ({ checked, source }) => {
if (checked) {
// What to put here to change the scheduling mode to 'Fixed Duration'??
} else {
// What to put here to change the scheduling mode to 'Normal'??
}
}
}
}
}
}
}
}
As you can see, we want to limit the available scheduling modes to 'Fixed Duration' (with 'Effort Driven' enabled) and 'Normal' (not effort driven) but have no idea how to write the effortDrivenField.change
handler.
MTIA for any advice given