calendar icon indicating copy to clipboard operation
calendar copied to clipboard

days-color数组项构成 让日历显示下个月 month属性无法生效

Open hzp-ui opened this issue 6 years ago • 3 comments

dayStyle1: [{ month: 'next', day: new Date().getDate(), color: 'white', background: 'red' }, { month: 'next', day: new Date().getDate(), color: 'white', background: 'red' } ]

hzp-ui avatar Sep 17 '18 09:09 hzp-ui

@hzp-ui 你是不是搞开发的啊

zhaoyh001 avatar Oct 14 '18 07:10 zhaoyh001

month属性只是用来显示非当前月的月份days-color用的,不同月份days-color应该是单独定义为一个json对象 像这样: days: { "3": [{ "month": "current", "day": 8, "color": "white", "background": "red", "title": "妇女节", "schedulecolor": "#ff0000" }], "4": [{ "month": "current", "day": 1, "color": "white", "background": "red", "title": "愚人节", "schedulecolor": "#ff0000" }] } 切换月份时将对应json对象赋值给dayStyle 我是这样理解和这样使用的

Xavier9896 avatar Feb 23 '19 09:02 Xavier9896

month属性只是用来显示非当前月的月份days-color用的,不同月份days-color应该是单独定义为一个json对象 像这样: days: { "3": [{ "month": "current", "day": 8, "color": "white", "background": "red", "title": "妇女节", "schedulecolor": "#ff0000" }], "4": [{ "month": "current", "day": 1, "color": "white", "background": "red", "title": "愚人节", "schedulecolor": "#ff0000" }] } 切换月份时将对应json对象赋值给dayStyle 我是这样理解和这样使用的

month属性只是用来显示非当前月的月份days-color用的,不同月份days-color应该是单独定义为一个json对象 像这样: days: { "3": [{ "month": "current", "day": 8, "color": "white", "background": "red", "title": "妇女节", "schedulecolor": "#ff0000" }], "4": [{ "month": "current", "day": 1, "color": "white", "background": "red", "title": "愚人节", "schedulecolor": "#ff0000" }] } 切换月份时将对应json对象赋值给dayStyle 我是这样理解和这样使用的

这样使用的话,切换月份的时候我会出现渲染延迟的问题,就是会有上个月的日期标记闪过

skytt avatar Mar 02 '19 21:03 skytt