phpcmsV9中表单向导在js调用里日期控件在IE下报Calendar未定义的解决办法

最近在phpcmsV9里用表单向导弄个的提交表单,但用了日期和时间类型时,用
 
<script language='javascript' src='{APP_PATH}index.php?m=formguide&c=index&a=show&formid=11&action=js&siteid=1'></script>
 
调用时在IE下报  “Calendar”未定义  的错误,导致日期控件没法使用
 
缘由是由在IE下,calendar.js文件加载没有阻塞Calendar.setup()方法的运行,Calendar.setup()在calendar.js未加载的状况,就开始执行了,因此就报出“Calendar”未定义  的错误
 
解决办法:
找到phpcms/libs/class/form.class.php文件
 
在174到182行
 javascript

Calendar.setup({ weekNumbers: '.$showweek.', inputField : "'.$id.'", trigger : "'.$id.'", dateFormat: "'.$format.'", showTime: '.$showsTime.', minuteStep: 1, onSelect : function() {this.hide();} });

改为:
php

$(function(){ Calendar.setup({ weekNumbers: '.$showweek.', inputField : "'.$id.'", trigger : "'.$id.'", dateFormat: "'.$format.'", showTime: '.$showsTime.', minuteStep: 1, onSelect : function() {this.hide();} }); });