jquery easyui datebox單擊文本框顯示日期選擇


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);
};


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM