Easyui DateBox 添加清空按钮

<input id="a" class="easyui-datebox" style="width:135px" data-options="buttons:buttons">
<script type="text/javascript">
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
        buttons.splice(1, 0, {
            text: '清空',
            handler: function (target) {
                $('#a').datebox('setValue', '');
                 $('#a').datebox('hidePanel');
            }
        });
</script>

这是为一个datebox添加清空,同一页面还有个

 <input id="b" class="easyui-datebox" style="width:135px" data-options="buttons:buttons">

怎么改js,


    <input id="a" class="easyui-datebox" style="width:135px" data-options="buttons:buttons">
    <input id="b" class="easyui-datebox" style="width:135px" data-options="buttons:buttons">
    <script type="text/javascript">
        var buttons = $.extend([], $.fn.datebox.defaults.buttons);
        buttons.splice(1, 0, {
            text: '清空',
            handler: function (target) {//target对象就是当前的inupt对象,不需要写死id
                $(target).datebox('setValue', '');
            }
        });
    </script>

在不改源码的前提下给datebox添加清空按钮......
答案就在这里:给easyui的datebox控件添加清空按钮
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

http://www.tuicool.com/articles/bQ7Bbuj