From 9d17bb056dfb03a96e7312a3326e6f74ba6458cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:27:37 +0000 Subject: [PATCH] Fix desktop calendar week grouping to properly start weeks on Monday and end on Sunday Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> --- Client/Pages/Index.razor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/Pages/Index.razor.cs b/Client/Pages/Index.razor.cs index c0c09ee..da3764c 100644 --- a/Client/Pages/Index.razor.cs +++ b/Client/Pages/Index.razor.cs @@ -322,7 +322,7 @@ namespace ShiftScheduler.Client.Pages } // Helper method to group days by week for desktop calendar view - // Each week starts with Monday and ends with Sunday (max 7 days per row) + // Each week starts with Monday and ends with Sunday private List> GetWeeksInMonth() { var days = SelectedDate.DaysInMonth(); @@ -334,8 +334,8 @@ namespace ShiftScheduler.Client.Pages // Add the day to current week currentWeek.Add(day); - // If it's Sunday or we have 7 days, end the week - if (day.DayOfWeek == DayOfWeek.Sunday || currentWeek.Count == 7) + // End the week when it's Sunday + if (day.DayOfWeek == DayOfWeek.Sunday) { weeks.Add(currentWeek); currentWeek = new List();