Is there any way to set a form item to be always readonly?
I have a datebox inside the form, I've set read Only in the editorOptions
JavaScript<dxi-item dataField="expiryDateTime" editorType="dxDateBox" [editorOptions]="{ value: null, width: '100%', readOnly: true }">
<dxo-label text="Data scadenza"></dxo-label>
</dxi-item>
With the code above, the dxDateBox is rendered as readonly, but when toggling the form readOnly property from true to false, also che dxDateBox become editable.
Am I missing something?
Hi,
I reproduced this issue on my side and passed the ticket to R&D team. You can use as a workaround the following code:
[editorOptions]="{ value: null, width: '100%', readOnly: true, onOptionChanged: function(e) { if(e.name === 'readOnly' && !e.value) { e.component.option('readOnly', true); } } }"