How to disable a calendar

I create a calendar from a input element by using

var myWarranty = new dhtmlXCalendarObject([‘wstart’]);

If I set the input element in the HTML code as “readonly” the calendar doesn´t popup if I click the field. If I set the input element per javascript everywhere in my code to readonly the calendar pops up if I click the field and I can select a date.

If a date is set I can use as workaround myWarranty.setSensitiveRange… with the selected date to prevent the user to select a different date. But what happens if the date is empty.

I can´t set the date to myWarranty.setSensitiveRange(“00.00.00”,“00.00.00”) or myWarranty.setSensitiveRange(null,null).

Best would be to have a command like myWarranty.disable / . enable or how can I handle this.

To reproduce your issue make a completed demo and attach it:
docs.dhtmlx.com/doku.php?id=othe … leted_demo