danheron / Heron.MudCalendar

Calendar component for MudBlazor
MIT License
174 stars 33 forks source link

Calendar items truncated in day and week view #108

Closed oh-cheezburgers closed 6 months ago

oh-cheezburgers commented 7 months ago

Description: When viewing calendar items in the day or week view, some items are either missing or only partly rendering. Upon further investigation, it was observed that calendar items which are less than the CalendarTimeInterval are being truncated.

Steps to Reproduce:

  1. Navigate to the day or week view of the calendar.
  2. Observe calendar items, especially those with a duration less than CalendarTimeInterval.

Expected Behavior: All calendar items, regardless of their duration, should render fully within the designated time slots.

Actual Behavior: Calendar items with a duration less than CalendarTimeInterval are truncated or missing in the day or week view.

Screenshots:

  1. Screenshot 1
  2. Screenshot 2

Additional Information: When inspecting the items using Chrome Developer tools, a div with a fixed height and an overflow property set to hidden can be observed. Removing the overflow property resolves the issue, allowing the item to render fully.

Environment:

danheron commented 6 months ago

It was made by design that the height of the calendar item = the duration of the item. However I see that with very short durations it doesn't work very well. I will review it.

danheron commented 6 months ago

I will add a new property DayItemMinHeight

If you set this to the same height as the DayCellHeight (default = 36) then it should do what you want.

oh-cheezburgers commented 6 months ago

That's brilliant, thank you!