2007-04-08
jscalendar日期选择框在yui-ext的dialog中的显示问题。
关键字: jscalendar yui-ext
大家应该都知道jscalendar这个日期选择框吧。 当在yui-ext中的dialog使用时,大家应该会想到会发生什么吧。日期选择框在变灰的背景后面。如下图:
大家都应该知道引起这个问题的原因是dialog的z-index比日期选择框的大。ok。我们只要让日期选择框的z-index比dialog还要大就ok。。
修改 calendar.js代码。 让在创建日期选择框的div时加上z-index属性.
粗体是后面加上的。
改后的效果ok。
大家都应该知道引起这个问题的原因是dialog的z-index比日期选择框的大。ok。我们只要让日期选择框的z-index比dialog还要大就ok。。
修改 calendar.js代码。 让在创建日期选择框的div时加上z-index属性.
Calendar.prototype.create = function (_par) {
var parent = null;
if (! _par) {
// default parent is the document body, in which case we create
// a popup calendar.
parent = document.getElementsByTagName("body")[0];
this.isPopup = true;
} else {
parent = _par;
this.isPopup = false;
}
this.date = this.dateStr ? new Date(this.dateStr) : new Date();
var table = Calendar.createElement("table");
this.table = table;
table.cellSpacing = 0;
table.cellPadding = 0;
table.calendar = this;
Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
var div = Calendar.createElement("div");
this.element = div;
div.className = "calendar";
if (this.isPopup) {
div.style.position = "absolute";
div.style.display = "none";
div.style.zIndex = "11111";
}
div.appendChild(table);
粗体是后面加上的。
改后的效果ok。
- 23:16
- 浏览 (2717)
- 评论 (6)
- 分类: javascript
- 进入论坛
- 相关推荐
评论
cozone_柯中
2007-04-09
dengyin2000 写道
cozone_柯中 写道
jscalendar这个日期选择对 具体时间的选择和操作不方便
cozone_柯中 写道
jscalendar这个日期选择对 具体时间的选择和操作不方便
jscalendar有对time的选择。看下面的demo
http://www.dynarch.com/demos/jscalendar/
我的意思是,选择具体的time不方便,回退的时候还要 按下 shift ..还有 不能 自己输入时间
dengyin2000
2007-04-09
cozone_柯中 写道
jscalendar这个日期选择对 具体时间的选择和操作不方便
cozone_柯中 写道
jscalendar这个日期选择对 具体时间的选择和操作不方便
jscalendar有对time的选择。看下面的demo
http://www.dynarch.com/demos/jscalendar/
cozone_柯中
2007-04-09
jscalendar这个日期选择对 具体时间的选择和操作不方便
dengyin2000
2007-04-09
是不是grid中的DateEditor??
dengyin2000
2007-04-09
差沙 写道
ext自己的日期选择也不错,相对小巧些。。
我没有找到呀? 能否给个link? yui-ext文档太少。
差沙
2007-04-09
ext自己的日期选择也不错,相对小巧些。。
- 浏览: 220475 次
- 性别:

- 来自: 广州

- 详细资料
搜索本博客
我的相册
VB-seamless
共 13 张
共 13 张
最近加入圈子
最新评论
-
使用Terracotta和Tomcat建 ...
renavatior 写道"运行start.bat 9081 这样我们就启动了目 ...
-- by rainsf -
使用Terracotta和Tomcat建 ...
"运行start.bat 9081 这样我们就启动了目录9081中的tomcat ...
-- by renavatior -
广州3年多经验 5500的 ...
fucku 写道广州的软件厂家可比深圳多多了,不过比起北京上海来,还是少了很多, ...
-- by yongfan_420 -
广州3年多经验 5500的 ...
广州的软件厂家可比深圳多多了,不过比起北京上海来,还是少了很多,导致机会也没有这 ...
-- by fucku -
广州3年多经验 5500的 ...
想高工资就去厂家咯,老在集成商里面混能有多大个奔头
-- by fucku






评论排行榜