You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to build a calendar with time slots as in this example:
Note how there's a time slot with a label every 15 minutes (6:30 am, 6:45 am, 7:00 am, and so on).
I tried reproducing this with slotDuration: '00:15:00' but the library will skip printing the time label at odd rows, which in practice, will only print the label every 30 minutes. using slotDuration: '00:07:30' won't work as it will generate additional rows I don't want.
I believe this odd-even print logic is caused by the condition in packages/time-grid/src/Section.svelte:15:
If the time slot label was printed for every row, it would satisfy my requirement (after some CSS fiddling). Could you please print the time slot label for every row, and hide it using CSS (i.e. using :nth-child(odd) and :nth-child(even) classes)? Or perhaps make it a configuration flag?
I'm open to contributing a PR if you're too busy to implement this.
The text was updated successfully, but these errors were encountered:
First, thank you for this wonderful library.
We are trying to build a calendar with time slots as in this example:
Note how there's a time slot with a label every 15 minutes (6:30 am, 6:45 am, 7:00 am, and so on).
I tried reproducing this with
slotDuration: '00:15:00'
but the library will skip printing the time label at odd rows, which in practice, will only print the label every 30 minutes. usingslotDuration: '00:07:30'
won't work as it will generate additional rows I don't want.I believe this odd-even print logic is caused by the condition in
packages/time-grid/src/Section.svelte:15
:<time class="{$theme.time}" datetime="{time[0]}" use:setContent={time[2] ? time[1] : ''}></time>
If the time slot label was printed for every row, it would satisfy my requirement (after some CSS fiddling). Could you please print the time slot label for every row, and hide it using CSS (i.e. using
:nth-child(odd)
and:nth-child(even)
classes)? Or perhaps make it a configuration flag?I'm open to contributing a PR if you're too busy to implement this.
The text was updated successfully, but these errors were encountered: