新聞中心
Discuz X3.2日歷選擇不出現(xiàn)選擇器bug解決方法
近期discuz退出3.2新版本,伴隨著新版本出現(xiàn),總是會出現(xiàn)各種各樣的bug,今天又出現(xiàn)一個問題,discuzX3.2的日歷選擇器不顯示,重點是照成這個bug的原因比較奇葩,竟然是程序員刪除了JS! 這個時候只能通過手動添加上這段控制日志的js了。解決方法如下: 打開文件static/js/calendar.js 在尾部添加上以下代碼即可: function showcalendar(event, controlid1, addtime1, startdate1, enddate1, halfhour1, recall) { controlid = controlid1; addtime = addtime1; startdate = startdate1 ? parsedate(startdate1) : false; enddate = enddate1 ? parsedate(enddate1) : false; currday = controlid.value ? parsedate(controlid.value) : today; hh = currday.getHours(); ii = currday.getMinutes(); halfhour = halfhour1 ? true : false; calendarrecall = recall ? recall : null; var p = fetchOffset(controlid); $('calendar').style.display = 'block'; $('calendar').style.left = p['left']+'px'; $('calendar').style.top = (p['top'] + 20)+'px'; doane(event); refreshcalendar(currday.getFullYear(), currday.getMonth()); if(lastcheckedyear != false) { $('calendar_year_' + lastcheckedyear).className = 'calendar_default'; $('calendar_year_' + today.getFullYear()).className = 'calendar_today'; } if(lastcheckedmonth != false) { $('calendar_month_' + lastcheckedmonth).className = 'calendar_default'; $('calendar_month_' + (today.getMonth() + 1)).className = 'calendar_today'; } $('calendar_year_' + currday.getFullYear()).className = 'calendar_checked'; $('calendar_month_' + (currday.getMonth() + 1)).className = 'calendar_checked'; $('hourminute').style.display = addtime ? '' : 'none'; lastcheckedyear = currday.getFullYear(); lastcheckedmonth = currday.getMonth() + 1; if(halfhour) { $('halfhourselector').style.display = ''; $('fullhourselector').style.display = 'none'; } else { $('halfhourselector').style.display = 'none'; $('fullhourselector').style.display = ''; } if(BROWSER.ie && BROWSER.ie < 7) { $('calendariframe').style.top = $('calendar').style.top; $('calendariframe').style.left = $('calendar').style.left; $('calendariframe').style.width = $('calendar').offsetWidth; $('calendariframe').style.height = $('calendar').offsetHeight; $('calendariframe').style.display = 'block'; } initclosecalendar(); } 關(guān)于這個版本還有其他的一些小bug: DiscuzX3.2新bug,后臺添加統(tǒng)計代碼不生效問題。
本文地址:http://www.gle-technology.com/discuz/14897.html