Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0.2版本清空这个按钮隐藏,传入isClear不起作用 #65

Open
TellYouLoveMe opened this issue Jan 10, 2018 · 2 comments
Open

Comments

@TellYouLoveMe
Copy link

RT,然后我去翻源码,貌似没有找到isClear这个opts的对应处理,之前3.8.2版本还有的,麻烦大大看一下

@ShenBao
Copy link

ShenBao commented Jan 12, 2018

isClear API失效,看了源码发现没有处理这个字段的逻辑,所以自己修改了源码:

修复后的演示地址

修复后的源码

在源代码379行后添加:

isClear = jet.isBool(opts.isClear);

395行至401行替换为:

var btnStr = '';
if (isClear) {
    btnStr = '<span class="clear">' + clearTxt + '</span>';
}
btnStr = btnStr + '<span class="today">' + lang.today + '</span><span class="setok">' + lang.yes + '</span>';
var timeStr = function() {
        var emStr = '<em></em><i>:</i><em></em><i>:</i><em></em>';
        return isrange ? emStr + "<span> ~ </span>" + emStr : emStr;
    },
    timeDiv = $("<div/>", { "class": "timecon" }).append(timeStr()),
    btnsDiv = $("<div/>", { "class": "btnscon" }).append(btnStr);

@TellYouLoveMe
Copy link
Author

@ShenBao 谢谢,其实我一开始就把这个源码修改了,跟你实现方式几乎一样,只是想来提个bug :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants