Comments (6)
改这个体验也不是很好,最好是关闭或确定的时候检测当前滚动到的date也就不会有这个BUG
` //缓动效果 line 557
function rollGear(target) {
...
target["int_" + target.id] = setInterval(function() {
//TODO BY ZYS
//还没滚动完关闭插件的情况
if(!_self.gearDate){
clearInterval(target["int_" + target.id]);
return;
}
...`
from lcalendar.
简单解决了下。有好的方式希望能够分享。
setDateGearTooth函数开头加入gearDate是否为null的判断。
//重置日期节点个数
function setDateGearTooth() {
if (_self.gearDate == null) {
return;
}
//下同源码
}
//重置时间节点个数
function setTimeGearTooth() {
if (_self.gearDate == null) {
return;
}
//下同源码
}
from lcalendar.
from lcalendar.
我这边做了一下处理,按照guog说的,他是这里加了null的判断,我这边在滚动条未停止时选择取消或确认还是会发生报错,后来我这么写貌似解决了;
function rollGear(target) {
//上同源码
switch (target.dataset.datetype) {
case "date_yy":
//中间省略
break;
case "date_mm":
if (_self.gearDate == null) {
return;
}
//中间省略
break;
case "date_dd":
if (_self.gearDate == null) {
return;
}
//下同源码
}
from lcalendar.
leftmouse 说的有效效果虽然差了点 起码不报错了 能根据离的最近的 最好了
from lcalendar.
动缓未效果结束时点击取消确定报错
看了下代码的英文setInterval的计时器内的代码引起的
1.80版本已修复该问题
from lcalendar.
Related Issues (20)
- 改写了一下原作者的代码,一起交流一下咯! HOT 1
- 在苹果手机上正常显示,但是在安卓手机上调不了日历插件
- 时间选好后,确定,再点时间选择,点取消,选择的时间能消失吗?
- 按照您之前告诉别人的这个方法,点击确定只能获取年分,怎么获取月份呀?!
- Uncaught TypeError: Cannot read property 'querySelector' of null HOT 2
- 提示rs is not define
- 一个bug HOT 1
- 移动端rem支持(自问自答)
- 不支持require吗? HOT 1
- 这个怎么取值 HOT 2
- LCalendar.js 文件102行变量未定义
- 在苹果手机上不能正常显示,在有些安卓手机的微信浏览器上调不了日历插件 HOT 2
- 和vue似乎有冲突 HOT 2
- 日期选中后,如何获取值呢? HOT 4
- 没有秒? HOT 4
- 如何在重置时间节点个数时,指定范围 HOT 1
- 感谢作者提供的源码,在这个基础上添加了一些功能 HOT 1
- 设置最小日期为下个月,就会出现时间选择在12月份的情况 HOT 1
- 点击时间确定按钮有没有回调方法? HOT 3
- LCalendar 日期选择插件如何动态指定最小日期?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcalendar.