Hello,
On a DATETIME field, we can turn the field into read-only using JQuery (as shown in the
HowTo). For example, the following code makes the datestart DATETIME field read-only:
function on_edit_form_shown(item) {
item.edit_form.find('input.datestart').prop('readonly', true); // make datestart RO
}
The code does makes the field read-only (so that its contents can be set programmatically) but both buttons before and after the field are still working, allowing the user to alter the proposed DATETIME value, which is not desirable. The parent object of the field (its container) does not have a read-only property.
What I want to do is either disable both buttons (the X and the calendar button) or hide them, so that the user cannot change the proposed DATETIME value.
How can this be done?
Thank you very much in advance for your help.