Detach or Prevent Calendar from opening on text input

Hello,
I have a need to have a calendar attached to a text input and allow a user to enter/choose a date when adding a new record (saving an order). After the order is saved, I would like to disable the field for editing and prevent the calendar from appearing, and at the very least, prevent the calendar if it does appear from changing the date in the field. Is there a way for me to detach the calendar from an input field or “Block” the on click action? Please let me know, if not, I will need to use a different tool.

Thank you

Hello,
If calendar is attached to input:

calendar = new dhtmlxCalendarObject('calInput');

you may use the following to detach calendar from this input:

h = document.getElementById('calInput').onclick; document.getElementById('calInput').onclick = null;

to attach calendar again:

document.getElementById('calInput').onclick = h;