detaches the calendar from an input field
obj | string|number|HTMLElement | input id, input DOM element, id returned by attachObj() |
Possible ways of using this method are the following:
1) to pass the input id:
<input type="text" id="input1">
<input type="text" id="input2">
var myCalendar = new dhtmlXCalendarObject(["input1","input2"]);
myCalendar.detachObj("input2");
2) to pass the input DOM element:
<input type="text" id="input1">
<input type="text" id="input2">
var myCalendar = new dhtmlXCalendarObject(["input1","input2"]);
var inputObj = document.getElementById("input2");
myCalendar.detachObj(inputObj);
3) for an input with an icon:
<input type="text" id="input">
<img id="icon" src="calendar.gif" border="0">
var myCalendar = new dhtmlXCalendarObject({input: "input", button: "icon"});
myCalendar.detachObj({input: "input", button: "icon"});
4) to pass the id returned by the attachObj() method:
<input type="text" id="input1">
<input type="text" id="input2">
<input type="text" id="input3">
var myCalendar = new dhtmlXCalendarObject(["input1","input2"]);
var objId = myCalendar.attachObj("input3");
myCalendar.detachObj(objId);
Back to top