radzen-blazor icon indicating copy to clipboard operation
radzen-blazor copied to clipboard

RadzenScheduler has a hard time showing appointments which starts time shifted

Open maxreb opened this issue 2 years ago • 1 comments

If you have appointments which are time shifted (i.e. every 15 minutes) you get a quite ugly looking experience. See image below, the different colors could be drawn one under another, but are left/right shifted. So imagine you have 6 appointments: 09:45 - 11:15 (Red) 10:00 - 11:30 (Green) 10:15- 11:45 (Yellow)

11:15 - 13:15 (Red) 12:00 - 13:30 (Green) 12:15 - 13:45 (Yellow

Then the red ones could be shown underneath, exactly the same as the green and yellow ones, but actually they all will be drawn horizontally shifted: image

My idea was to sort the items beforehand by their respective color but that didn't worked, so I took a look in the Radzen source code and found this line: https://github.com/radzenhq/radzen-blazor/blob/f6189c6d8a79fc38f74296b8abf4438198c30b6a/Radzen.Blazor/Rendering/DaySlotEvents.razor#L73

Here the data will be sorted by starting time, so my sort will be destroyed. The same for Week and Month View.

To fix this we could delete this line and let the user decide how the items will be sorted.

  • Version 3.16.6

maxreb avatar May 19 '22 14:05 maxreb

I am afraid removing the sorting could be a breaking change.

akorchev avatar Jun 13 '22 19:06 akorchev