`
happyqing
  • 浏览: 3157025 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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

 

 

  • 大小: 8.2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics