首页 > Web开发 > 详细

jquery easyui datebox单击文本框显示日期选择

时间:2014-03-01 02:47:57      阅读:1386      评论:0      收藏:0      [点我收藏+]

jquery easyui的datebox日历控件,实现单击文本框出现日历选择,如下图:

bubuko.com,布布扣

 

代码:

修改jquery.easyui.min.js第9797行函数(jQuery EasyUI 1.3.2),添加红色文字部分

 

function _745(_746,_747){
var opts=$.data(_746,"combo").options;
var _748=$.data(_746,"combo").combo;
var _749=$.data(_746,"combo").panel;
if(_747){
opts.width=_747;
}
if(isNaN(opts.width)){
var c=$(_746).clone();
c.css("visibility","hidden");
c.appendTo("body");
opts.width=c.outerWidth();
c.remove();
}
_748.appendTo("body");
var _74a=_748.find("input.combo-text");
var _74b = _748.find(".combo-arrow");
var _74c = opts.hasDownArrow ? _74b._outerWidth() : 0;

//blueusn 2013-02-28
//datebox单击文本框出现日期选择
if ($(_746).hasClass("datebox-f"))
{
_74a.click(function () {
_74b.click();
});
}

_748._outerWidth(opts.width)._outerHeight(opts.height);
_74a._outerWidth(_748.width()-_74c);
_74a.css({height:_748.height()+"px",lineHeight:_748.height()+"px"});
_74b._outerHeight(_748.height());
_749.panel("resize",{width:(opts.panelWidth?opts.panelWidth:_748.outerWidth()),height:opts.panelHeight});
_748.insertAfter(_746);
};

jquery easyui datebox单击文本框显示日期选择,布布扣,bubuko.com

jquery easyui datebox单击文本框显示日期选择

原文:http://www.cnblogs.com/zhangxu724100/p/3573661.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!