feat: enhance calendar with view sync, Redux fixes, and dynamic slot label dimming

- Sync calendar view state between Calendar and Menubar components
- Fix Redux serialization errors by using string dates instead of Date objects
- Add null checks for eventResize handler to prevent undefined errors
- Implement dynamic slot label dimming near current time indicator
- Slot labels fade to opacity 0.2 when now indicator is within 15 minutes
- Add smooth CSS transitions for better user experience
- Handle edge cases around midnight for proper time calculation
- Update slot label visibility on view changes and time updates
This commit is contained in:
lenhanphung
2025-09-25 14:57:04 +07:00
parent 24efa2b62e
commit b9d7a8fa6b
5 changed files with 72 additions and 17 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ export default function EventDuplication({
const [openModal, setOpenModal] = useState(false);
const [selectedRange, setSelectedRange] = useState<DateSelectArg | null>({
start: new Date(event.start),
startStr: new Date(event.start).toISOString(),
startStr: event.start,
end: new Date(event.end ?? ""),
endStr: new Date(event.end ?? "").toISOString(),
endStr: event.end ?? "",
allDay: event.allday ?? false,
} as DateSelectArg);
const calendarRef = useRef<CalendarApi | null>(null);