Closed Jeroen-VdB closed 1 month ago
Hi,
I wonder if it would be worth re-implementing this feature as a user specifiable list? Instead of static enums there could be a default list (5,10,15,...,180), then it could be overridden to suite your needs.
Simple mockup:
[Parameter]
public int[] CalendarMinuteIntervals { get; set; } = new[] { 5, 10, 15, 20, 30, 60, 120, 180 };
<MudCalendar CalendarMinuteIntervals="new int[] { 1, 5, 60, 180, 360}" />
MudBlazor TablePager as an example: https://mudblazor.com/components/table#tablepager-customization
Willing to make a PR if wanted
I initially thought the same but this was already asked in #56 with a reply
It's difficult to change it to an arbitrary amount now as it would break backwards compatibility. However I will add some more options to the enum including an option for 3 hours.
Therefore I simply added a time interval suited for my use case.
Perhaps a conversion from the enum value to int to keep it backwards compatible and adding a new property that accepts a list of arbitrary values could be an options? Although I am not sure how this would impact the UI, I haven't gone into detail enough in this project.
Changing it to an arbitrary value might be a good idea. For the moment we will just add the 5 minute option.
First of all, thanks for this awesome component! It is already very useful for my small personal project. In my use case it would be very helpful to quickly edit the calendar items via drag & drop. The smallest timeframe needed is 5 minutes. Currently the smallest is 10. I added a 5 Minutes option to the CalendarTimeInterval enum.
I was able to successfully run all unit tests as well as the unit tests viewer:
However, I was not able to test the Docs, even after cloning the MudBlazor/mudcalendar repo into the same parent folder and building it in release. I got: