Git Product home page Git Product logo

Comments (6)

leftmouse avatar leftmouse commented on September 27, 2024 2

改这个体验也不是很好,最好是关闭或确定的时候检测当前滚动到的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.

guog avatar guog commented on September 27, 2024 1

简单解决了下。有好的方式希望能够分享。
setDateGearTooth函数开头加入gearDate是否为null的判断。

//重置日期节点个数
function setDateGearTooth() {
  if (_self.gearDate == null) {
    return;
  }
  //下同源码
}
//重置时间节点个数
function setTimeGearTooth() {
  if (_self.gearDate == null) {
    return;
  }
  //下同源码
}

from lcalendar.

scofieldfan avatar scofieldfan commented on September 27, 2024

我也发现这个问题了。
image

from lcalendar.

Kaltsit163 avatar Kaltsit163 commented on September 27, 2024

我这边做了一下处理,按照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.

shusc24 avatar shusc24 commented on September 27, 2024

leftmouse 说的有效效果虽然差了点 起码不报错了 能根据离的最近的 最好了

from lcalendar.

xfhxbb avatar xfhxbb commented on September 27, 2024

动缓未效果结束时点击取消确定报错
看了下代码的英文setInterval的计时器内的代码引起的

1.80版本已修复该问题

from lcalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.