设置默认值 时间为 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)
发表评论