easyui有两个日期控件,datebox和datetimebox,分别修改。
打开jquery.easyui.min.js文件,一键美化(ctrl+shift+f),方便加代码。
1.datebox
搜索“datebox-current”,关键代码如下:
var _858 = $("<div class=\"datebox-button\"></div>").appendTo(_856);
$("<a href=\"javascript:void(0)\" class=\"datebox-current\"></a>").html(opts.currentText).appendTo(_858);
$("<a href=\"javascript:void(0)\" class=\"datebox-close\"></a>").html(opts.closeText).appendTo(_858);
_858.find(".datebox-current,.datebox-close").hover(function() {
$(this).addClass("datebox-button-hover");
}, function() {
$(this).removeClass("datebox-button-hover");
});
_858.find(".datebox-current").click(function() {
_854.calendar.calendar({
year : new Date().getFullYear(),
month : new Date().getMonth() + 1,
current : new Date()
});
});
_858.find(".datebox-close").click(function() {
$(_853).combo("hidePanel");
});
加上清空的代码后,如下:
var _858 = $("<div class=\"datebox-button\"></div>").appendTo(_856);
$("<a href=\"javascript:void(0)\" class=\"datebox-current\"></a>").html(opts.currentText).appendTo(_858);
//此处的datebox-ok是easyui自带的样式,我尝试加上datebox-clean的样式,但是没效果
$("<a href=\"javascript:void(0)\" class=\&