vis-timeline icon indicating copy to clipboard operation
vis-timeline copied to clipboard

Style odd /even for days ?

Open ChR-iSz opened this issue 2 years ago • 2 comments

How i can style odd/even days ?

as example: odd days -> background-color: white; even days -> background-color: lightgrey;

ChR-iSz avatar Sep 03 '21 05:09 ChR-iSz

I came accross the same thing and found no answer on how to configure the timeline.
In the end I helped myself by setting the className: of every even group id to odd-days and of every odd group id to odd-day.
But this requires that the groups are sorted with the option groupOrder: 'id'

christau avatar Dec 28 '21 15:12 christau

Nice workaround, but it looks like that works only for groups, right ? I search for a solution for the next 20-30 days in horizontal view.

ChR-iSz avatar Dec 28 '21 21:12 ChR-iSz

Please see this example on how to style even/odd entries: https://visjs.github.io/vis-timeline/examples/timeline/styling/gridStyling.html

mojoaxel avatar Sep 02 '23 20:09 mojoaxel