Categories | Question details Back To List | ||
DHTMLX Calendar : Resetting the setSensitive functionality. Hi, I want to reset the setSensitive functionality of calendar. Means after calling setSensitive, I want to reset such functionality thru js function. How to do it ? Answer posted by Support on Sep 02, 2008 03:14 You can clear sensetive settings as calenda.sensitiveFrom=calendar.sensitiveTo=null; Answer posted by Tejas Shah on Sep 02, 2008 06:30 Hi, I tried using it, but its not working. I have created two calendar objects : effDate and expDate. The code is something like this : effDate = new dhtmlxCalendarObject('showCalDivLibrary',null, {isYearEditable: true, isMonthEditable: true}); /* Updates : To show close button, reset on calendar; By : Tejas; Date : 21/Aug/2008 : S */ var d=document.createElement("DIV"); d.style.cssText="position:absolute; top:2px; right:4px; cursor:pointer;"; d.innerHTML="<img src="+Gpath+"/images/close.gif>"; d.onclick=function(){ effDate.hide(); }; var r=document.createElement("DIV"); r.style.cssText="position:absolute; top:150px; right:70px; font-family:Tahoma; font-size:8pt; cursor:pointer;"; r.innerHTML="Reset"; r.onclick=function(){ $('effectiveDate').value = '';effDate.hide(); alert(expDate); expDate.sensitiveFrom=expDate.sensitiveTo=null;}; effDate.con.firstChild.appendChild(d); effDate.con.firstChild.appendChild(r); Answer posted by Support on Sep 02, 2008 08:29 r.onclick=function(){ $('effectiveDate').value = ''; effDate.hide(); expDate.sensitiveFrom=expDate.sensitiveTo=null; exp.draw(); //force view update }; |