Git Product home page Git Product logo

lcalendar's Issues

报错

LCalendar.js:443 Uncaught TypeError: Cannot read property 'querySelector' of null

重置日期节点个数时,死循环,报错

//重置日期节点个数

var date_yy = _self.gearDate.querySelector(".date_yy");

如果日期选择控件还处于滚动状态(没有完全定位到具体的日期上),此时点击了确定按钮,则此时会进入一个死循环,此处会一直报错:
           Uncaught TypeError: Cannot read property 'querySelector' of null
需加上一个为空判断 if(!_self.gearDate){return;}

怎么获取日期的值?

选择了日期之后,我要怎么获取value?
看到之前有人提出来了,但是小白表示看不懂啊/(ㄒoㄒ)/~~
求方法简明的解析?

月份和日期变化的时候,引起了年份的变化

我设置了 data-lcalendar="2011-01-11,2016-12-31"
画面年份选择2014年,这个时候月份从11变12,这个时候年就会变成2013
一下几种情况都会出现年份变化的现象
1,月份选择1月,手势从上往下
2,月份选择12月,手势从下玩上
3,日期选择1号,手势从上往下
4,日期选择该月份的最后一日,手势从下往上

小时和分能做限制吗?

比如,请假申请的时候,小时部分,只能是9-17,分钟的部分,只能00或30选择,类似这些限制,希望可以更加人性化

一个页面多个日期选择输入框的问题

在一个页面中,多个Input加载日期选择控件,类型都为“date”日期选择。无论点击哪一个输入框,加载的都是最后一个输入框的日期,并且确认后返回的值也是在最后一个输入框中。

iphone上safari看样式有问题

iphone上safari看样式有问题
1、选择datetime时,整个选择飘到上面去了。
2、选择date时,聚焦的点还停留在input上,穿透到上面来了。

滑动日期选择时触发页面scroll的解决方案

在插件呼出后,滑动日期选择时,会触发页面的scroll事件,造成弹层底部的页面也跟着滚动。
虽然我们不能阻止scroll事件,但是可以通过阻止touchmove默认事件来解决这个问题;

解决方案如下:

1、在呼出插件方法内为插件外围容器和document定义阻止默认和阻止冒泡;当然,document只给阻止默认即可;
_self.gearDate.addEventListener('touchmove',preventEv); document.addEventListener('touchmove',preventEv);

2、 在closeMobileCalendar方法中移除事件绑定
_self.gearDate.removeEventListener('touchmove',stopProp,1); document.removeEventListener('touchmove',preventEv);

function preventEv(){ event.stopPropagation(); event.preventDefault(); }

LCalender插件报错

一直报错:Uncaught TypeError: Cannot read property 'querySelector' of null,
找不到原因,请作者帮忙

有一个bug

在移动端,快速上下滑动秒,在动画还没有停下来的情况下点击确定,会有死循环报错
LCalendar.js:443 Uncaught TypeError: Cannot read property 'querySelector' of null
而且重现率非常的高。不只是秒。年也会这样,只要是那种选择比较多。动画比较长的久会出现,
我修改了一下。
在重置时间节点和重置日期节点中加了个
try{
var time_hh = _self.gearDate.querySelector(".time_hh");
}catch(err){}
这样就避免报错了。但是也有一个小问题,那就是只有等到动画结束后才能点击确定。这样才能选择上,不让选择不上。当然这样也比死循环报错好点,希望博主改正一下;
最后🙏感谢博主无私贡献,

不设置 initial-scale=1 会导致无法滑动

我设置 meta<meta name="viewport" content="width=1184, maximum-scale=1,user-scalable=no"> 会导致无法滑动,控制台信息为:
Ignored attempt to cancel a touchend event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

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.