500){B=this._def_count.firstChild}}if(!B){return }B.onclick=null;B.innerHTML="";if(B.parentNode){B.parentNode.removeChild(B)}if(this._def_count){this._def_count.style.top="-1000px"}};scheduler.isCalendarVisible=function(){if(this._def_count&&parseInt(this._def_count.style.top,10)>0){return this._def_count}return false};scheduler.attachEvent("onTemplatesReady",function(){dhtmlxEvent(document.body,"click",function(){scheduler.destroyCalendar()})});scheduler.templates.calendar_time=scheduler.date.date_to_str("%d-%m-%Y");scheduler.form_blocks.calendar_time={render:function(){var D="";var B=scheduler.config;var E=this.date.date_part(new Date());if(B.first_hour){E.setHours(B.first_hour)}D+=" ";var A=scheduler.config.full_day;return""+D+" – "+D+"
"},set_value:function(B,K,H){var D=B.getElementsByTagName("input");var F=B.getElementsByTagName("select");var A=function(N,L,M){N.onclick=function(){scheduler.destroyCalendar(null,true);scheduler.renderCalendar({position:N,date:new Date(this._date),navigation:true,handler:function(O){N.value=scheduler.templates.calendar_time(O);N._date=new Date(O);scheduler.destroyCalendar();if(scheduler.config.event_duration&&M==0){J()}}})}};if(scheduler.config.full_day){if(!B._full_day){B.previousSibling.innerHTML+="";B._full_day=true}var I=B.previousSibling.getElementsByTagName("input")[0];var E=(scheduler.date.time_part(H.start_date)==0&&scheduler.date.time_part(H.end_date)==0&&H.end_date.valueOf()-H.start_date.valueOf()<2*24*60*60*1000);I.checked=E;for(var C in F){F[C].disabled=I.checked}for(var C=0;C0){continue}scheduler.markCalendar(B,F,"dhx_calendar_click");F=scheduler.date.add(F,1,"day")}}}}return true};scheduler.attachEvent("onViewChange",A);scheduler.attachEvent("onXLE",A);scheduler.attachEvent("onEventAdded",A);scheduler.attachEvent("onEventChanged",A);scheduler.attachEvent("onAfterEventDelete",A);A()};