AppianZ / calendar

A Custom calendar (⁎⁍̴̛ᴗ⁍̴̛⁎) 自定义日历选择器,时间范围精确到日,可精准自定义设置每个日期的初始样式和点击后的回调,提供 "弹层模式" 和 "普通排列" 的两种模式。
158 stars 35 forks source link

switchRender在减小月份是传回来的month多减了1 #9

Closed stigmergy-xx closed 6 years ago

stigmergy-xx commented 7 years ago

switchRender: function (year, month, cal) 增大月份时回传的month是正确的,是标题栏上的月份,减小月份时回传的month多减了1。 比如当前显示的年月是2017年8月,我加月份时回调显示month为9,;当我从8月减为7月时,回调显示month为5。不得已使用cal.currentMonth,它是从0开始的月份,增加减小月份逻辑上都没问题。不知道其他人有没有发现这种情况

AppianZ commented 7 years ago

https://github.com/AppianZ/calendar/blob/master/How_to_Build_it.md

这是有意为之,请仔细阅读文档