Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

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

Open
hzp-ui opened this issue Sep 17, 2018 · 3 comments
Open

Comments

@hzp-ui
Copy link

hzp-ui commented Sep 17, 2018

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

@zhaoyh001
Copy link

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

@Xavier9896
Copy link

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
Copy link

skytt commented Mar 2, 2019

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
我是这样理解和这样使用的

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants