jquery easyui的datebox日历控件,实现单击文本框出现日历选择,如下图:
代码:
修改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);};