appianz / calendar Goto Github PK
View Code? Open in Web Editor NEWA Custom calendar (⁎⁍̴̛ᴗ⁍̴̛⁎) 自定义日历选择器,时间范围精确到日,可精准自定义设置每个日期的初始样式和点击后的回调,提供 "弹层模式" 和 "普通排列" 的两种模式。
A Custom calendar (⁎⁍̴̛ᴗ⁍̴̛⁎) 自定义日历选择器,时间范围精确到日,可精准自定义设置每个日期的初始样式和点击后的回调,提供 "弹层模式" 和 "普通排列" 的两种模式。
日历切换到beginTime,或者endTime的时候,继续滑动有bug
可以在generateItemBodyArr方法里面定义一个值为42的常量,然后下月在本月显示的天数就按
var afterCount = 42 - beforeCount - dateCount
这样切换的时候高度就保证不变,效果好些。
星期也没必要放在每个月份里面,太多余了。
switchRender输出的年月日有问题,我自己改了。
calendar向左滑动月份返回的数据不对啊,少两个月,还能解决么
和vue有冲突,需要通过js来控制时间选择器的显示,但是不知道如何操作
昨天才发布啊 看了下简历 95年都两年工作经验了吗...厉害了 人也漂漂 谢谢你喔
日历组件,怎么返回到今天的日期?大神能提供一个思路吗?
事件下面能不能加其他数据,比如每个日期下面加上当天的次数,如果没听明白的话,可以加qq联系吗?qq:790741637
怎么给每次点击选中的时间加个不同的样式
首页,我昨天已经认真看过你的文档了,看完之后还有几个问题想请教一下:switchRender: function (year, month, cal){} 这个方法,之前你说year和month是指计算机识别的年份和月份,我想问下,什么是计算机识别的年份和月份 这块儿不懂
是否可以支持切换周呢?
左滑到临界点后继续滑动会有问题,但右滑临界点没有
你好,首先对你提供的这个插件表示感谢,有个疑问switchRender怎么修改才能返回绝对正确的结果啊,不管增加或者减少月份返回的都是正确的?谢谢,本人菜鸟,不好意思
只是希望往下滚动翻页,结果也触发了选择日期的事件
switchRender: function (year, month, cal)
增大月份时回传的month是正确的,是标题栏上的月份,减小月份时回传的month多减了1。
比如当前显示的年月是2017年8月,我加月份时回调显示month为9,;当我从8月减为7月时,回调显示month为5。不得已使用cal.currentMonth,它是从0开始的月份,增加减小月份逻辑上都没问题。不知道其他人有没有发现这种情况
您好, 向左切换的时候, 月份不对
向左滑动时,switchRender:方法里打印的月份是错的
IOS8系统下,滑不动,还有点击的话只会有初始的三个月份循环,求问
大佬可以提供一个跳转到指定年份及月份的方法么。。
请问是怎么取到当前滑动到的月份呢?向左向右滑动
cal.move.X = event.touches[0].clientX;
这段代码应该在touchStart
中进行初始化一次, 可以解决滑动的时候会有闪屏现象touchEnd
这个事件中,处理enddis
的计算稍微做了一下修改。// 此处判断是左滑动 还是右滑动,并且是否滑动到能切换的程度 // enddis = (cal.end.X * 2 >= cal.width && Math.abs(tempDis) * 5 >= cal.width) ? // Math.ceil(enddis / cal.width) : Math.floor(enddis / cal.width);
修改后if(Math.abs(tempDis) * 5 >= cal.width){ enddis = tempDis > 0 ? Math.ceil(enddis / cal.width) : Math.floor(enddis / cal.width); }else{ enddis = parseInt(cal.distance / cal.width); }
,主要解决左右滑动时触发切换的条件不一致新增我自己在修改的时候也新增了一些功能如:
beforeRenderArr中添加其它几项设置
beforeRenderArr: [{
stamp: 1512057600000, // 指定某个时间戳
className: 'disable', // 指定该时间戳渲染的样式
text: '过节', // 在数字下面显示文字, 用于节气的显示
html: '
比如说,代办事项,点击代办事项的会调,或者可以添加新元素,提供一个位置,让我们去自定义,
还有点击日期的时候添加样式不是很灵敏,建议看一下
calendar.js:451 Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.