您的足迹:首页 > JS/JQ >laydate 设置默认值 时间为 00:00:00之后无法清空

laydate 设置默认值 时间为 00:00:00之后无法清空

3333.png

设置默认值 时间为 00:00:00 之后就无法清空

1、非压缩版代码如下 替换代码如下


} else if(/HH|H/.test(item)){ //时
 if(thisv < 0) thisv = 0, error = true;                       //这行  原  thisv < 1  改为   thisv < 0
dateTime.hours = thisv;
 } else if(/mm|m/.test(item)){ //分
options.range && (that[startEnd[index]].hours = thisv);
 dateTime.minutes = thisv;
if(thisv < 0) thisv = 0, error = true;                       //这行  原  thisv < 1  改为   thisv < 0
 if(thisv < 0) thisv = 0, error = true;                      //这行  原  thisv < 1  改为   thisv < 0
options.range && (that[startEnd[index]].minutes = thisv);
                    } else if(/ss|s/.test(item)){ //秒
                        dateTime.seconds = thisv;
 }
 options.range && (that[startEnd[index]].seconds = thisv);



2、压缩版代码如下 替换代码如下

搜索 /HH|H/.test(l)?(c<1&&(c=0,a=!0)      //替换为 /HH|H/.test(l)?(c<0&&(c=0,a=!0)
搜索 /mm|m/.test(l)?(c<1&&(c=0,a=!0)     //替换为 /mm|m/.test(l)?(c<0&&(c=0,a=!0) 
搜索 /ss|s/.test(l)&&(c<1&&(c=0,a=!0)     //替换为 /ss|s/.test(l)&&(c<0&&(c=0,a=!0)



本博客所有文章如无特别注明均为原创。作者:潇潇枫叶复制或转载请以超链接形式注明转自 木风溪
原文地址《laydate 设置默认值 时间为 00:00:00之后无法清空

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)