DesignRemakes
DesignRemakes copied to clipboard
Add Scrollable Days and Time Slots to CalendarView
Issue:
• Days were displayed statically, limited to four entries.
• Time slots were fixed and did not allow vertical scrolling.
• Day names were hardcoded, requiring manual updates.
Solution:
• Added horizontal scrolling for all days of the month.
• Enabled vertical scrolling for time slots.
• Made day names dynamic, based on the date.
Key Changes:
• Replaced static day boxes with a ScrollView(.horizontal) using a ForEach loop for 31 days.
• Replaced hardcoded time slots with a ScrollView(.vertical) spanning 12 AM–11 PM.
• Added dayOfWeek(for:) to calculate day names dynamically.