Spaces:
Running
Running
gpt-engineer-app[bot]
commited on
Commit
·
bfa7245
1
Parent(s):
6d0b1ef
Fix: Calendar month display
Browse filesThe calendar was displaying duplicate days across month views. This commit updates the calendar to only display days belonging to the correct month.
- src/pages/Calendar.tsx +2 -1
src/pages/Calendar.tsx
CHANGED
|
@@ -328,6 +328,7 @@ const CalendarPage = () => {
|
|
| 328 |
selected={selectedDate}
|
| 329 |
onSelect={setSelectedDate}
|
| 330 |
numberOfMonths={isYearView ? 12 : 1}
|
|
|
|
| 331 |
className="bg-white rounded-lg p-6 shadow-sm mx-auto w-full"
|
| 332 |
components={{
|
| 333 |
Day: ({ date, ...props }) => (
|
|
@@ -345,7 +346,7 @@ const CalendarPage = () => {
|
|
| 345 |
head_row: "flex",
|
| 346 |
head_cell: "text-muted-foreground rounded-md w-10 font-normal text-[0.8rem]",
|
| 347 |
row: "flex w-full mt-2",
|
| 348 |
-
cell: "h-10 w-10 text-center text-sm p-0 relative focus-within:relative focus-within:z-20
|
| 349 |
day: "h-10 w-10 p-0 font-normal hover:bg-neutral-100 rounded-lg transition-colors",
|
| 350 |
day_today: "bg-neutral-100 text-primary font-semibold",
|
| 351 |
nav: "space-x-1 flex items-center",
|
|
|
|
| 328 |
selected={selectedDate}
|
| 329 |
onSelect={setSelectedDate}
|
| 330 |
numberOfMonths={isYearView ? 12 : 1}
|
| 331 |
+
showOutsideDays={false}
|
| 332 |
className="bg-white rounded-lg p-6 shadow-sm mx-auto w-full"
|
| 333 |
components={{
|
| 334 |
Day: ({ date, ...props }) => (
|
|
|
|
| 346 |
head_row: "flex",
|
| 347 |
head_cell: "text-muted-foreground rounded-md w-10 font-normal text-[0.8rem]",
|
| 348 |
row: "flex w-full mt-2",
|
| 349 |
+
cell: "h-10 w-10 text-center text-sm p-0 relative focus-within:relative focus-within:z-20 hover:bg-neutral-50",
|
| 350 |
day: "h-10 w-10 p-0 font-normal hover:bg-neutral-100 rounded-lg transition-colors",
|
| 351 |
day_today: "bg-neutral-100 text-primary font-semibold",
|
| 352 |
nav: "space-x-1 flex items-center",
|