解决easy ui 1.4datebox控件不能清空的问题
2014-11-20 17:25
351 查看
用easy ui遇到这个问题,在网上找到了解决方案,不过是1.3.6版本的。现提供1.4版本的修改的具体位置和代码。
我们用的是这个
![](http://images.cnitblog.com/blog/671022/201411/201730457651836.png)
修改位置:12739行,添加代码:
修改下面的代码的数字,修改为:
最终的buttons里的代码是:
在汉化包相应位置添加代码:
$.fn.datebox.defaults.cleanText = '清空';
我们用的是这个
![](http://images.cnitblog.com/blog/671022/201411/201730457651836.png)
修改位置:12739行,添加代码:
, { text: function (_987) { return $(_987).datebox("options").cleanText; }, handler: function (_988) { $(_988).combo("setValue", "").combo("setText", ""); $(_988).combo("hidePanel"); } }
修改下面的代码的数字,修改为:
, { text: function (_989) { return $(_989).datebox("options").closeText; },handler:function(_990){ $(this).closest("div.combo-panel").panel("close"); }}
最终的buttons里的代码是:
buttons:[{text:function(_985){ return $(_985).datebox("options").currentText; },handler:function(_986){ $(_986).datebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()}); _975(_986); } }, { text: function (_987) { return $(_987).datebox("options").cleanText; }, handler: function (_988) { $(_988).combo("setValue", "").combo("setText", ""); $(_988).combo("hidePanel"); } }, { text: function (_989) { return $(_989).datebox("options").closeText; },handler:function(_990){ $(this).closest("div.combo-panel").panel("close"); }}]
在汉化包相应位置添加代码:
$.fn.datebox.defaults.cleanText = '清空';
相关文章推荐
- 在动态插入Easyui datebox控件时,使用$.parser.parse()手工渲染时,解决日期控件原有的值被清除问题
- vs2008中,不能将控件拖到页面上之问题解决
- Infragistics NetAdvantage 的 ASP.NET部分控件在IE7.0 IE8.0 下不能正常工作的问题及解决
- 解决PB中不能用OpenUserObject实例化Line、Oval、Rectangle、RoundRectangle等窗口控件的问题
- 用来解决 ViewFlipper 在其他控件上不能滑动的问题
- jQuery EasyUI动态添加控件或者ajax加载页面后不能自动渲染问题的解决方法
- C#解决StatusStrip控件上的项目不能靠右对齐的问题
- 解决 asp.net 中如果 Menu 控件放在 MasterPage 中, IE6 会出现的二级菜单不能正确显示的问题
- JQueryUI dialog控件不响应服务端事件问题解决,dialog不能提交表单
- 因外键约束导致数据不能清空的问题解决
- vs2008中,不能将控件拖到页面上之问题解决
- 解决IE8不能安装支付宝控件问题
- JSP使用base标签和时间控件时IE6下不能打开站点,已终止操作问题解决
- 解决IE8不能安装支付宝控件问题
- Infragistics NetAdvantage 的 ASP.NET部分控件在IE7.0下不能正常工作的问题及解决
- DropDownList控件_SelectedIndexChanged事件不能触发问题解决
- 解决WebForm_DoPostBackWithOptions不能与验证控件共存的问题
- ElasticSearch使用jdbc-river同步数据库出现dateOptionalTime不能识别的问题解决办法一则
- 解决皮肤控件skinEngine不能在vs2010使用的问题
- [C#]解决statusStrip控件上的项目不能靠右对齐的问题