easyui-1.2.6 datebox 加入清空按钮

 

效果图
      
 

easyui datebox控件没有清空按钮,感觉是个缺陷,通过如下方法可以加入

 

修改jquery.easyui.min.js,找到时间控件,在今天与关闭中间添加清空。

搜索currentText

在10100行加入如下行

$("<a href=\"javascript:void(0)\" class=\"datebox-clean\"></a>").html(opts.cleanText).appendTo(_756);

加入datebox-clean的单击事件

_756.find(".datebox-clean").click(function(){
$(_751).combo("setValue","").combo("setText","");
$(_751).combo("hidePanel");
});

 

添加Clean文字,

搜索currentText,加入cleanText:"Clean"

currentText:"Today",cleanText:"Clean",closeText:"Close",okText:"Ok"

 

修改jquery-easyui-1.2.6/locale/easyui-lang-zh_CN.js

//代码行数41,加入清空
$.fn.datebox.defaults.cleanText = '清空';

 

修改CSS样式,添加清空样式,

jquery-easyui-1.2.6/themes/default/easyui.css

.datebox-clean {
	color:#888;
	text-decoration:none;
	font-weight:bold;
	float: center;
}

 

 OK,运行看看效果!!!

 

jquery-easyui-1.3.4版本请参考

http://www.kankanews.com/ICkengine/archives/92892.shtml

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值