@foreach (var item in cell.Items)
{
- @CellTemplate?.Invoke(item)
+ @if (Calendar.ItemClicked.HasDelegate)
+ {
+
OnItemClicked(item)" @onclick:stopPropagation="true" class="mud-cal-clickable">
+ @CellTemplate?.Invoke(item)
+
+ }
+ else
+ {
+
+ @CellTemplate?.Invoke(item)
+
+ }
}
;
diff --git a/Heron.MudCalendar/Components/MonthView.razor.cs b/Heron.MudCalendar/Components/MonthView.razor.cs
index 5f4433e..93286a1 100644
--- a/Heron.MudCalendar/Components/MonthView.razor.cs
+++ b/Heron.MudCalendar/Components/MonthView.razor.cs
@@ -61,6 +61,16 @@ protected virtual Task OnCellLinkClicked(CalendarCell cell)
return Calendar.CellClicked.InvokeAsync(cell.Date);
}
+ ///