-
I need a custom background (stripes, in our case) on a specific type of events in There doesn't seem to be any way of adding some kind of type/category/kind to an event that I can target by CSS. A class or data attribute, will do just fine, but I've searched high and low on how to add one. Other than fantastically hairy hackery, I have not found a way. The striped background must be applied to the actual So I've tried to set the event name, which doesn't appear to do anything at all. I've tried the event category - also no change in the DOM that is useful in this scenario. I've even tried to forcibly make such events "timed", but having only all-day events, this obviously didn't change anything in the DOM. All this is hackery, and I basically just need a class or a data attribute. I do know how to set the foreground & background colours of an event, but this is ONLY the colour. I cannot put a whole css So what do I do? Bottomline:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If your event colors are classes instead of css colors you can just add another string to it like export default {
extends: VCalendar,
methods: {
genEvent (event, ...args) {
const vnode = VCalendar.options.methods.genEvent(event, ...args)
vnode.data.class.striped = event.input.striped
return vnode
}
}
} |
Beta Was this translation helpful? Give feedback.
If your event colors are classes instead of css colors you can just add another string to it like
primary striped
.If the colors are hex or something yeah you're kinda screwed, the only way I can think of would be to override the method: