easyui时间控件设置为可清空——jquery-easyui-1.3.3(这个版本还没有buttons,网上的好多博文都是1.3.5之后的版本)...

效果图:

更改的源码jquery.easyui.min.js 11358行:

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-clean\"></a>").html(opts.cleanText).appendTo(_858);
$("<a href=\"javascript:void(0)\" class=\"datebox-close\"></a>").html(opts.closeText).appendTo(_858);
_858.find(".datebox-current,.datebox-clean,.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-clean").click(function(){    //clean——新增清空
$(_853).combo('setText','');  
$(_853).combo('setValue',''); 
$(_853).combo("hidePanel");
});
_858.find(".datebox-close").click(function(){
$(_853).combo("hidePanel");
});
};
};

jquery.easyui.min.js 11441行:

}},currentText:"Today",cleanText:"Clean",closeText:"Close",okText:"Ok",formatter:function(date){

更改easyui-lang-zh_CN.js,41行增加:$.fn.datebox.defaults.cleanText = '清空';

完成。

 

转载于:https://www.cnblogs.com/tldxh/p/9025363.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值