Hello Support,
When we edit a task, we see a field Manually scheduled in it - https://prnt.sc/115om9f.
We want to disable that field if it meets a condition.
We have tried the following:
- Disabling in 'beforeTaskEditShow' method:
beforeTaskEditShow({ editor, taskRecord })
{
window.currentTaskRecord = taskRecord;
const { generalTab } = editor.widgetMap;
if (condition_satisifed) {
const { manuallyScheduledField } = generalTab.widgetMap;
manuallyScheduledField.editable = false;
manuallyScheduledField.disabled = true;
manuallyScheduledField.readOnly = true;
manuallyScheduledField.input.editable = false;
}
}
None of the above 4 (.editable, .disabled, .readOnly, .input.editable) are working.
- We also tried in 'taskEdit':
taskEdit: {
items: {
generalTab: {
items: {
manuallyScheduledField: {
type: 'checkbox',
weight: 800,
name: 'manuallyScheduled',
label: 'Manually scheduled',
flex: '1 0 50%',
disabled: true,
readOnly: true
}, ......
}
}
}
}
'disabled: true' and 'readOnly: true' do not work for us. Also, note that we have not added condition here just to check if this works for us, We'll have to add condition later on. Only if the condition is met, should the manuallScheduled be disabled.
Can you please help us resolbe this?