关于ecside中所使用的日历组件的问题
|
matthieu
2007-06-25
我使用了ecside的动态更新功能,对于其中的日期,当双击后进行选择相应日期时,js报错。
看了以下js源代码,关键在于ECSideUtil.showCalendar中的 Calendar.trigger({ inputField : inputObj.previousSibling.name, // id of the input field 这个元素无法拿到相应的名称为null。 但是页面元素和相应模版我都已经按照demo_full.jsp中配置好了,是不是我还遗漏了什么呢? 希望知道或是有这个经历的人讲解一下,谢谢。 页面中的元素: <ec:column width="150" property="createTime" title="创建时间" editTemplate="ecs_t_date" /> 模版: <textarea id="ecs_t_date" rows="" cols="" style="display:none"> <input type="text" class="inputtext" value="" style="width:100px;" name="" /> <input class="calendarImgButton" onclick="ECSideUtil.showCalendar(this, 'createTime')" type="button" id="date_button" /> </textarea> |
|
|
matthieu
2007-06-25
这个问题已经好不容易解决了。
引起这个问题的原因实在是让人悍然: <textarea id="ecs_t_date" rows="" cols="" style="display:none"> <input type="text" class="inputtext" value="" style="width:100px;" name="" /> <input class="calendarImgButton" onclick="ECSideUtil.showCalendar(this, 'createTime')" type="button" id="date_button" /> </textarea> 以上的模版文件问题就在于那两个input框之间我换了行,只要让它们连在一起,js就不会出错,这个实在是... 或许fins能够给一个解释。谢谢 |
|
|
rubin
2008-05-07
因为ECSideUtil.showCalendar里面用了previousSibling,两个input之间不能有其他任何符号
|
|
|
rubin
2008-05-07
previousSibling 属性的作用是:返回已选元素的上一个同属节点(同级节点中的上一个)。
|

